skip to content
[readonly]

Builds WebAssembly binaries from C: types, imports, functions with bodies, memories, tables, globals, exports, segments

sh
$ sexc add @ajax/wasm-builder
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 04:27v/# 1 version
  • drwxr-xr-x-Oct 27 04:27files/# the files of 0.1.0
latest
0.1.0, published Oct 27 04:27 by ajax
owners
ajax
license
MIT
dependencies
@ajax/wasm-types ^0.1.0, @ajax/mesh-check ^0.1.0
dependents
@ajax/mesh-exec-wasm-imports, @ajax/wasm-decode, @ajax/wasm-float-guard, @ajax/wasm-fuse, @ajax/wasm-interp, @ajax/wasm-lower, @ajax/wasm-validate
keywords
wasm webassembly assembler builder testing
repository
https://github.com/thomasdavis/alpha-c-mesh
==> 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).