Skip to main content

Module module

Module module 

Source
Expand description

WasmModule — the adapter that turns a WASI .wasm binary into a crate::Runtime.

Use this to host any language whose interpreter ships as a WASI module: pass the bytes, point the language tag, done. The same adapter will eventually back Lisp/JS/Python/Lua once their WASM builds are stable.

Contract for the hosted module:

  • It’s a _start-style WASI command (wasmtime <file> runs it).
  • Source is delivered on stdin.
  • Output goes to stdout, diagnostics to stderr.
  • Exit code 0 = success; non-zero = user-script error.

That contract makes every hosted interpreter testable on the host with wasmtime directly, without our crate in the loop.

Structs§

WasmModule
A WASM-hosted language runtime.