Simple streamable WebAssembly binary parser.
Test
Compiling Code
npm run build
Examples
See the examples/
folder.
Running Tests
npm test
Creating Tests
Place a .wasm
and an associated .wasm.out
file in the test
directory.
The testing harness will compare the parsing output of the .wasm
file against the .wasm.out
file.
You can use the npm test update
command to automatically create a .out
files. This is useful if you have made a change that affects the tests.
3.0.0 (2020-06-24)
- revert!: add option to truncate disassembly (2eb0025), closes #30
BREAKING CHANGES
- dropping the
WasmDisassembler#maxLines
feature that was introduced earlier.
The WasmDisassembler#maxLines
feature doesn't interact well
with the chunked disassembly machinery, in particular the
logic in getResult()
to avoid breaking def-use chains for
labels didn't play well with the maxLines
feature at all
(it would remove ;; -- text is truncated due to size --
marker when the line limit was reached).
Since there's already support for chunked disassembly built
into wasmparser by design, that should be used instead.