Continuous Integration | Test Coverage | Documentation | Crates.io |
---|---|---|---|
Wasmi is an efficient and lightweight WebAssembly interpreter with a focus on constrained and embedded systems.
Wasmi is suitable for safety critical use cases and has been audited several times already.
Wasmi Version(s) | Auditor | Contractor | Report |
---|---|---|---|
0.36.0 -0.38.0 |
Runtime Verification Inc. | Stellar Development Foundation | |
0.31.0 |
SRLabs | Parity Technologies |
The following list states some of the distinct features of Wasmi.
- Simple, correct and deterministic execution of WebAssembly.
- Low-overhead and cross-platform WebAssembly runtime for embedded environments.
- JIT bomb resisting translation.
- Loosely mirrors the Wasmtime API.
- 100% WebAssembly spec testsuite compliance.
- Built-in support for fuel metering.
- Supports the official Wasm C-API.
Refer to the Wasmi usage guide to learn how properly to use Wasmi.
The new Wasmi engine supports a variety of WebAssembly proposals and will support even more of them in the future.
WebAssembly Proposal | ||
---|---|---|
✅ | mutable-global |
≥ 0.14.0 |
✅ | saturating-float-to-int |
≥ 0.14.0 |
✅ | sign-extension |
≥ 0.14.0 |
✅ | multi-value |
≥ 0.14.0 |
✅ | bulk-memory |
≥ 0.24.0 |
✅ | reference-types |
≥ 0.24.0 |
✅ | tail-calls |
≥ 0.28.0 |
✅ | extended-const |
≥ 0.29.0 |
✅ | multi-memory |
≥ 0.37.0 |
✅ | custom-page-sizes |
≥ 0.41.0 |
✅ | memory64 |
≥ 0.41.0 |
✅ | wide-arithmetic |
≥ 0.42.0 |
📅 | simd |
Tracking Issue |
📅 | relaxed-simd |
Depends on simd . |
📅 | function-references |
Tracking Issue |
📅 | gc |
Tracking Issue |
📅 | threads |
Tracking Issue |
📅 | exception-handling |
Tracking Issue |
👨🔬 | WASI | WASI (wasip1 ) support via the wasmi_wasi crate. |
👨🔬 | C-API | Official Wasm C-API support via the wasmi_c_api_impl crate. |
Clone the Wasmi repository and build using cargo
:
git clone https://github.com/wasmi-labs/wasmi.git --recursive
cd wasmi
cargo build
cargo test
In order to benchmark Wasmi use the following command:
cargo bench
Use translate
, instantiate
, execute
or overhead
filters to only run benchmarks that test performance of Wasm translation, instantiation, execution or miscellaneous overhead respectively, e.g. cargo bench execute
.
Wasmi supports a wide variety of architectures and platforms.
- Fore more details see this list of supported platforms for Rust.
- Note: Wasmi can be used in
no_std
embedded environments, thus not requiring the standard library (std
). - Only some platforms are checked in CI and guaranteed to be fully working by the Wasmi maintainers.
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
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.