Home

Awesome

Continuous IntegrationTest CoverageDocumentationCrates.io
cicodecovdocscrates

Wasmi - WebAssembly (Wasm) Interpreter

<p align="center"> <img src="./resources/wasmi-logo.png" width="100" height="100"> </p>

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

Security Audits

Wasmi is suitable for safety critical use cases and has been audited several times already.

Wasmi Version(s)AuditorContractorReport
0.36.0-0.38.0Runtime Verification Inc.Stellar Development FoundationPDF
0.31.0SRLabsParity TechnologiesPDF

Distinct Features

The following list states some of the distinct features of Wasmi.

Usage

Refer to the Wasmi usage guide to learn how properly to use Wasmi.

WebAssembly Proposals

The new Wasmi engine supports a variety of WebAssembly proposals and will support even more of them in the future.

WebAssembly ProposalStatusComment
mutable-global0.14.0.
saturating-float-to-int0.14.0.
sign-extension0.14.0.
multi-value0.14.0.
bulk-memory0.24.0. (#628)
reference-types0.24.0. (#635)
tail-calls0.28.0. (#683)
extended-const0.29.0. (#707)
multi-memory0.37.0. (#1191)
simdUnlikely to be supported.
relaxed-simdUnlikely to be supported. Depends on simd.
function-references📅Not yet implemented. (#774)
gc📅Not yet implemented. (#775)
threads📅Not yet implemented. (#777)
exception-handling📅Not yet implemented. (#1037)
custom-page-sizes📅Not yet implemented. (#1197)
WASI👨‍🔬Experimental support for WASI (wasip1) via the wasmi_wasi crate.
C-API👨‍🔬Experimental support for the official Wasm C-API via the wasmi_c_api_impl crate.

Development

Build & Test

Clone the Wasmi repository and build using cargo:

git clone https://github.com/wasmi-labs/wasmi.git --recursive
cd wasmi
cargo build
cargo test

Benchmarks

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.

Supported Platforms

Wasmi supports a wide variety of architectures and platforms.

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.