skip to content
==> README.md <==
1# @ajax/wasm-builder
2
3WebAssembly binaries assembled from C: a byte buffer with the binary format's encoders (LEB128, names,
4floats, sections, instruction shorthands), and a module builder for types, imports, functions with
5locals and bodies, a memory, a table, globals, exports, a start function, and element and data
6segments, written out as sections in the spec's order. Indices are the caller's to get right, so it
7builds invalid modules on request — what tests of a validator need.
8
9Written for the tests of alpha-c-mesh's WebAssembly interpreter (`wasm-decode`, `wasm-validate`,
10`wasm-interp`, `wasm-float-guard`, the wasm executor), the way alpha-rust-mesh's `mesh-host/src/wasm.rs`
11tests assemble modules by hand. Tests: `tests/builder.c` (byte-for-byte with wat2wasm's output).