wasmi is a free, open source gaming project written in Rust and released under Apache-2.0. It has 2,340 GitHub stars, 379 forks and 48 open issues, and was last pushed 4 days ago. On this registry it ranks #54 of 75 tracked projects in Gaming, with 5 head-to-head comparisons available. It gained 4 stars over the last 4 tracked days.

What is wasmi?

Wasmi is an efficient, lightweight and deterministic WebAssembly interpreter, written in Rust and published as the wasmi crate, for constrained and embedded systems and for applications that need a safe plug-in runtime.

What it is

Wasmi is a WebAssembly interpreter implemented in Rust and distributed through crates.io, with API documentation on docs.rs and a usage guide kept in the repository at docs/usage.md. It executes WebAssembly modules with an interpreter rather than translating them ahead of time, and the project describes itself as efficient, cross-platform and focused on constrained and embedded systems. It lives in the Rust crate ecosystem, and its topic list places it in edge computing, embedded systems, game engines and plug-in systems. The source is released under Apache-2.0.

The problem it solves is the one a host application faces when it wants to run third-party or untrusted code inside its own process. That host needs execution that behaves identically on every platform, that cannot be pushed into unbounded work, and that does not depend on a just-in-time compiler being available on the target. Wasmi answers this by resisting compiler and JIT bombs during translation, by shipping built-in fuel metering, and by loosely mirroring the Wasmtime API so that it can serve as a drop-in replacement for the Wasmtime engine a host would otherwise embed.

Key capabilities

  • Provides simple, correct and deterministic execution of WebAssembly, which the README lists as a distinct feature.
  • Runs in no_std embedded environments, covering the targets catalogued in Rust's platform-support list.
  • Resists compiler and JIT bombs during translation, and supplies built-in fuel metering so a host can bound how much work guest code performs.
  • Loosely mirrors the Wasmtime API, which the README frames as making it a drop-in replacement.
  • Claims 100% compliance with the WebAssembly spec testsuite.
  • Covers a broad set of proposals, including simd from 0.43.0, relaxed-simd from 0.44.0, memory64 and custom-page-sizes from 0.41.0, wide-arithmetic from 0.42.0, multi-memory from 0.37.0, extended-const from 0.29.0, tail-calls from 0.28.0, and bulk-memory and reference-types from 0.24.0.
  • Supports the official Wasm C-API through the wasmi_c_api_impl crate and WASI (wasip1) through the wasmi_wasi crate.

Who uses it and how

  • Embedded and constrained deployments, where the no_std support allows the interpreter to be built into firmware that has no operating system beneath it.
  • Applications that host plug-ins, including game engines, where the deterministic execution model and fuel metering make guest behaviour repeatable and bounded.
  • Edge computing deployments that need one WebAssembly runtime behaving the same way across platforms rather than per-architecture compiled code.
  • Safety-critical and blockchain-adjacent projects: Wasmi has been audited twice, once for versions 0.36.0 to 0.38.0 by Runtime Verification Inc. on behalf of the Stellar Development Foundation, and once for 0.31.0 by SRLabs on behalf of Parity Technologies.
  • Hosts already written against the Wasmtime API, which can substitute Wasmi without restructuring their embedding code, and C or C++ hosts that reach it through the Wasm C-API.

Getting started

Add the wasmi crate from crates.io as a dependency, then follow the usage guide at docs/usage.md; crate features are documented on the docs.rs page. WASI and C-API support come from the companion wasmi_wasi and wasmi_c_api_impl crates.

How it compares

The only comparable tool the facts name is Wasmtime, whose API Wasmi loosely mirrors in order to act as a drop-in replacement, so a host can move between the two without rewriting its embedding layer. The distinction the project draws is that it stays an interpreter and remains usable in no_std environments while resisting JIT bombs, which is where a compiler-based engine is the weaker fit.

When to use it — and when not to

Because translation is interpreted, this is not the runtime to choose when peak throughput on compute-heavy guest code is the deciding requirement. Teams that need threads, garbage collection, function references or exception handling will find each of those still tracked as an open issue rather than supported, and several proposals only arrive in recent releases, so projects pinned to older versions miss simd, relaxed-simd and memory64. There is no service to operate beyond the crate itself, but there is also no hosted offering: adopters embed a library and take on its upgrade cadence.

project readme (upstream, from github) — read inline
Continuous Integration Test Coverage Documentation Crates.io
ci codecov docs crates

Wasmi - WebAssembly (Wasm) Interpreter

Wasmi is an efficient and lightweight WebAssembly interpreter with a focus on constrained and embedded systems.

Distinct Features

  • Simple, correct and deterministic execution of WebAssembly.
  • Efficient and cross-platform WebAssembly runtime for no_std embedded environments.
  • Compiler/JIT bomb resisting translation.
  • Loosely mirrors the Wasmtime API to act as drop-in replacement.
  • 100% WebAssembly spec testsuite compliance.
  • Built-in support for fuel metering.
  • Supports the official Wasm C-API.

Security Audits

Wasmi is suitable for safety critical use cases and has been audited twice.

Wasmi Version(s) Auditor Contractor Report
0.36.0-0.38.0 Runtime Verification Inc. Stellar Development Foundation PDF
0.31.0 SRLabs Parity Technologies PDF

Docs

WebAssembly Features

Embeddings
✅ WASI WASI (wasip1) support via the wasmi_wasi crate.
✅ C-API Official Wasm C-API support via the wasmi_c_api_impl crate.

Used by

If you want your project on this list please inform me about you project and how Wasmi is used.

Soroban · Typst · Zellij · Josh · Ripple · Firefly Zero · icu4x · orbitinghail · smoldot · Munal OS · Ayaka · Project Oak

Sponsors

Special thanks to the past and present sponsors of the Wasmi project.

    </a>

Sponsoring since Oct. 2024

Sponsored until Oct. 2024

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Frequently asked questions

Is wasmi free to use?

wasmi is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does wasmi do?

WebAssembly (Wasm) Interpreter - An efficient, lightweight, and deterministic WebAssembly interpreter for embedded systems and plug-in runtimes.

What is wasmi written in?

wasmi is primarily written in Rust. Its source is publicly available at https://github.com/wasmi-labs/wasmi, and it has 2,340 GitHub stars.