4 ms·
> reading the binary format ... it'd be nice to do more advanced debugging with a text format. Do you know about `wasm2wat` (from the WebAssembly binary toolki
by cfallin 6y ago
> reading the binary format ... it'd be nice to do more advanced debugging with a text format.
Do you know about `wasm2wat` (from the WebAssembly binary toolkit, "WABT")? It produces a 1-to-1 text representation of the bytecode and is meant to always roundtrip via `wat2wasm` back to the same bytecode.
- _hardwaregeek 6y agoYeah...I should probably use that. But does it work on mangled WASM? Part of the issue was that my compiler wasn't producing valid WASM
- cfallin 6y agoAh, no, probably doesn't do parsing recovery. But `wasm-validate` from the same toolkit will at least tell you the offset at which your wasm file has an error (I just flipped some bits in a wasm file to test this), which may be helpful!