Concepts
The validator, the host import surface, the trap model — the model you need to use the library beyond copy-paste.
The Quickstart shows the three common shapes of caller code. This section is about the model behind those shapes: what Runtime.instantiate actually does before it returns, how host imports get wired up, and what kinds of failures cross the API boundary.
- ModuleInstance — what
Runtime.instantiatereturns and the public surface for invoking exports, reading globals, and touching linear memory. - Validation — what runs before any wasm code does.
- Host imports —
HostModuleandHostFuncfrom the inside. - Traps and errors — the
WasmErrormodel and what causes each variant. - Tracer — instrumentation hooks for opcode counts, function transitions, throws, and traps.