Introduction
formawasm is a backend compiler that turns a formalang Intermediate Representation (IR) module into a WebAssembly component — a .wasm binary that any standards-compliant runtime can execute.
formalang frontend ──► IrModule ──► formawasm ──► .wasm component ──► host runtime
formawasm is a backend: it doesn't parse .fv source files itself, and it doesn't run the resulting wasm. Both are jobs for other libraries (formalang for parsing, wasmtime / wasmi / a browser engine for execution). formawasm only emits bytes.
Every public formalang declaration becomes a typed entry point in the component's interface. The boundary is described in WIT (Wasm Interface Types), the small Interface Definition Language of the Component Model. formawasm generates the WIT file automatically from the public surface of each IR module — the host never hand-writes WIT.
Two ways to read these docs
The book is split into two halves; pick the entry point that matches what you want to do.
- Embedding formawasm in your application → start with Quickstart, then Using the Library and Hosting a Component. The Boundary Policy and Type Mapping chapters explain what formalang values look like when they cross into your host code.
- Contributing to formawasm or extending the backend → start with Architecture, then Crate Layout and Lowering. Extending the Backend covers adding new IR variants or runtime helpers; Testing and Contributing describe the project's quality bar.
Status
Phases 1 through 5 are closed; the backend produces a Component-Model artifact for every milestone. See Feature Coverage for the per-IR-variant breakdown and the project's CHANGELOG.md for a phase-by-phase history.