node-motoko icon indicating copy to clipboard operation
node-motoko copied to clipboard

Groundwork for WASI debugging

Open rvanasa opened this issue 2 years ago • 1 comments

This PR adapts the logic from this WASI polyfill file for a headless Node.js environment.

Progress:

  • [x] Refactor to TypeScript
  • [x] Decouple Wasm functionality from user interface
  • [x] Expose hexdump() and show() functions
  • [x] Allow custom handling of debug_print output
  • [x] Run WASI modules from a file for quick testing (creating tests/wasm/Debug.test.wasm will activate another unit test)

Future work:

  • [ ] Source maps?
  • [ ] JS return value?
  • [ ] Breakpoints?
  • [ ] Stack inspection?

rvanasa avatar Mar 13 '23 23:03 rvanasa

size-limit report 📦

Path Size
lib/index.js 15.3 KB (+13.05% 🔺)
packages/latest/base.json 87.82 KB (0%)
versions/latest/moc.min.js 487.72 KB (0%)
versions/latest/moc_interpreter.min.js 280.9 KB (0%)
versions/latest/didc.min.js 60.46 KB (0%)

github-actions[bot] avatar Mar 13 '23 23:03 github-actions[bot]