WAGMI is a minimalistic in-place WebAssembly interpreter written in Rust, with full support for the WebAssembly 1.0 core standard.
Based on the original paper by Ben L. Titzer.
/src- Core interpreter implementationmodule.rs- WebAssembly module parsing and structurevalidator.rs- Module validation logicinstance.rs- Runtime instance and execution enginewasm_memory.rs- Linear memory managementsignature.rs- Function signature handlingleb128.rs- LEB128 encoding/decoding utilitiesbyte_iter.rs- Byte stream iteration helperserror.rs- Error types and handlinglib.rs- Library entry point/bin- Example usage demonstrations
/tests- Tests/spec_tests.rs- Test runner/core- WebAssembly spec test suite
/tools- WebAssembly text format to bytecode translation tools/docs- More detailed documentation
The spec test suite is from the WebAssembly specification repository. The wast2json and wat2wasm binaries used are version 1.0.13 (1.0.14) Windows version available here.
Note: This project specifically targets the WebAssembly 1.0 core standard. Newer test converters may not be compatible. Support beyond 1.0 will only be considered after some performance-improving overhauls.