skip to content
==> README.md <==
1# @ajax/wasm-reader
2
3A cursor over a WebAssembly binary: bounds-checked reads of bytes, LEB128 numbers, little-endian
4constants, names (with the spec's UTF-8 check) and vector counts (refused when they can't fit in what's
5left, so a hostile count never allocates). The first failure is recorded as `"<what> (at offset 0x<n>)"`,
6as wasmparser words it, and later reads return zeroes, so a parser reads straight through and checks
7`failed` at the end. Header-only.
8
9Part of alpha-c-mesh's WebAssembly interpreter (replacing wasmparser in the port of alpha-rust-mesh's
10`mesh-host/src/wasm.rs`). Tests: through `@ajax/wasm-decode` and `@ajax/wasm-instr`.