wabt.js icon indicating copy to clipboard operation
wabt.js copied to clipboard

[Feature Request] Expose CLI tools to the Web.

Open 7ombie opened this issue 3 years ago • 2 comments

This is pretty much covered by the title. Most of the CLI utilities (like wasm-objdump and wasm-decompile), would be useful in the browser too.

7ombie avatar Jul 11 '21 02:07 7ombie

I'd love to have wasm-interp exposed, or really I want an interpreter object that I can call .step() on.

thomasballinger avatar Aug 01 '21 20:08 thomasballinger

If they added DWARF support to wat2wasm, you'd be able to use breakpoints (with introspection) in DevTools. Still, it would be nice to have the ability to programmatically step the engine too.

It would be cool if we could optionally instantiate an engine instance that supports stepping and stuff like that (accessing global registers et cetera) in the browser. Accepting that performance may be worse and less consistent (if you do run the engine at full speed), it shouldn't be very hard to implement, and would be really useful, especially for hobbyist/educational apps.

7ombie avatar Aug 01 '21 22:08 7ombie