Formal semanticsmodels WebAssembly
WasmCert-Rocq
Also known as WasmCert-Coq, wasm_coq, WasmRef-Coq
A model of WebAssembly 2.0 (plus tail calls and subtyping) in Rocq, with a type soundness proof and a verified interpreter that is extracted to OCaml and run on the official tests.
What it covers
- Models
- WebAssembly, WebAssembly 2.0, plus tail calls and subtyping
- Fragment
- Wasm 2.0 typing, execution and module instantiation, plus tail calls and the subtyping rules of the function-references and GC proposals. Integer and float operations come from CompCert's integer and float libraries (built on Flocq). SIMD instructions are opaque: their execution calls the official reference interpreter. The binary parser is unverified (experimental). Wasm 3.0 GC structs and arrays, exceptions, multiple memories and 64-bit memories are not listed as covered.
- Written in
- Rocq
- Usable in
- Rocq
- Validation
- The extracted interpreter (WasmRef-Coq) is proved sound with respect to the Rocq semantics. It runs the official conformance test suite (a WasmCert copy of it, included as a submodule) in CI, and the README says it is expected to pass all core tests. Tail calls are not tested this way.
- Maintained by
- Xiaojia Rao, Martin Bodin
Stage
Computed from the evidence below; see the criteria. MechanizedMechanized. Written in a form a computer can check, rather than on paper. means a computer can check the definition.
- Met: Can be executed or tested An interpreter extracted to OCaml runs .wasm and .wat files. evidence
- Met: Published results against conformance tests or real implementations The conformance suite runs in CI (make run_wast). No published pass counts were found; the README says all core tests are expected to pass. evidence
- Not met: Adopted by the language or ISA owner, or covers the full current version and tracks new ones Adopted by the owner: no; full coverage: no; tracks new versions: no. Not adopted by the WebAssembly Community Group. Covers Wasm 2.0 plus some later features. The current version, Wasm 3.0 (September 2025), adds GC, exceptions, multiple memories and 64-bit memories, which are not covered. No stated schedule for following new Wasm versions was found. evidence
Coverage
Which parts of WebAssembly the model defines.
WebAssembly-specific features
| Feature | Support | Notes |
|---|---|---|
| Structured control flow Blocks, loops, branches and the operand stack. | SupportedSupported.Includes tail calls. Source | Includes tail calls. source |
| Linear memory Loads, stores and memory growth. | SupportedSupported.Wasm 2.0 memory instructions, including bulk memory. Source | Wasm 2.0 memory instructions, including bulk memory. source |
| Tables and indirect calls Function tables and call_indirect. | SupportedSupported. Source | source |
| SIMD 128-bit vector instructions. | PartialPartial.SIMD instructions are parsed as opaque opcodes and executed by calling the reference implementation. Their meaning is not defined in Rocq. Source | SIMD instructions are parsed as opaque opcodes and executed by calling the reference implementation. Their meaning is not defined in Rocq. source |
| GC and reference types The garbage-collection and reference-types proposals. | PartialPartial.Wasm 2.0 reference types plus the subtyping rules from the function-references and GC proposals. GC structs and arrays are not covered. Source | Wasm 2.0 reference types plus the subtyping rules from the function-references and GC proposals. GC structs and arrays are not covered. source |
Used by
Toolchains in this index whose proofs are about this model.
No toolchain in the index refers to it yet.
Sources
- WasmCert-Coq repository and README · accessed 26 Nov 2026
- License (MIT with LGPL parts) · accessed 26 Nov 2026
- Release 2.2.1 notes · accessed 26 Nov 2026
- Watt et al., Two Mechanisations of WebAssembly 1.0 (FM 2021), author copy · accessed 26 Nov 2026
- Iris-Wasm program logic branch · accessed 26 Nov 2026