NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #2019 most downloaded on crates.io
WebAssembly interpreter
Last release 16 days ago
01 Sep 2026
Ships unpredictably
gaps range from 8 days to 3 months
Nearly every release is documented
notes for 54 of the last 60 stable releases
52 versions withdrawn
withdrawn after publishing
9 years old
140 releases · first in 2018
Added support for the official Wasm C-API.
wasmi_c_api_impl crate allows to use Wasmi via the Wasm C-API from Rust code.Instance::new API. (https://github.com/wasmi-labs/wasmi/pull/1134)
Clone implementation for Module. (https://github.com/wasmi-labs/wasmi/pull/1130)
Error instead of FuelError. (https://github.com/wasmi-labs/wasmi/pull/1131)
FuelError is still accessible via the Error::kind method.Fixed a dead-lock that prevented users from compiling Wasm modules in host functions called from Wasmi's executor.
One column per quarter.
CodeMap::alloc_funcs API and use it when compiling Wasm modules. (https://github.com/wasmi-labs/wasmi/pull/1125)
Module::new) by up to 23%.Allows Wasmi CLI to be installed with locked dependencies. ([#1096])
cargo install --locked wasmi_cliFuncType to 1000, each. (#1116)Added Error trait impls for all Wasmi error types impleemnting Display.
Error trait impls for all Wasmi error types impleemnting Display. (https://github.com/wasmi-labs/wasmi/pull/1089)
clippy warning about map_err. (https://github.com/wasmi-labs/wasmi/pull/1094)Added support for Wasm custom sections processing.
Module.Config::ignore_custom_sections flag to disable this functionality.Config::ignore_custom_sections flag to disable processing custom sections if this is unwanted. (https://github.com/wasmi-labs/wasmi/pull/1085)Memory::{data_ptr, data_size, size} methods. (https://github.com/wasmi-labs/wasmi/pull/1082)Memory::grow signature to mirror Wasmtime's Memory::grow method. (https://github.com/wasmi-labs/wasmi/pull/1082)Memory::current_pages method. (https://github.com/wasmi-labs/wasmi/pull/1082)
Memory::size method instead.Fix overlapping reuse of local preservation slots.
Refine and generalize the fix for v0.32.1.
Fixes a miscompilation when merging two copy instructions where the result of the first copy is also the input to the second copy and vice versa.
Updated CI jobs to use dtolnay/rust-toolchain instead of actions-rs because the latter was deprecated.
Note:
Engine executes roughly 80-100% faster and
compiles roughly 30% slower according to benchmarks conducted so far.Module::new_unchecked API. (https://github.com/wasmi-labs/wasmi/pull/829)
Module::new Wasmi eagerly compiles Wasm bytecode into Wasmi bytecode
which is optimized for efficient execution. However, this compilation can become very
costly especially for large Wasm binaries.CompilationMode::Eager: Eager compilation, what Wasmi did so far. (default)CompilationMode::LazyTranslation: Eager Wasm validation and lazy Wasm translation.CompilationMode::Lazy: Lazy Wasm validation and translation.CompilationMode::LazyTanslation: Usually improves startup performance by a factor of 2 to 3.CompilationMode::Lazy: Usually improves startup performance by a factor of up to 27.CompilationMode::Lazy can lead to partially validated Wasm modules
which can introduce non-determinism when using different Wasm implementations.
Therefore users should know what they are doing when using CompilationMode::Lazy if this is a concern.let mut config = wasmi::Config::default();
config.compilation_mode(wasmi::CompilationMode::Lazy);
CompilationMode::Lazy or CompilationMode::LazyTranslation and fuel metering is enabled
the first function access that triggers compilation (and validation) will charge fuel respective
to the number of bytes of the Wasm function body. (https://github.com/wasmi-labs/wasmi/pull/876)Module::new and
Module::new_unchecked are now non-streaming with insane performance improvements of up
to 80% in certain configurations.Module::new_streaming and Module::new_streaming_unchecked APIs.Module::validate API. (https://github.com/wasmi-labs/wasmi/pull/840)
Engine config.Module::new or Module::new_unchecked
might still fail due to translation errors.--compilation-mode argument to enable lazy Wasm compilation. (https://github.com/wasmi-labs/wasmi/pull/849)--verbose mode to Wasmi CLI by @tjpalmer. (https://github.com/wasmi-labs/wasmi/pull/957)
Memory::new_static constructor by @Ddystopia. (https://github.com/wasmi-labs/wasmi/pull/939)
Memory from a static byte array
which is especially handy for certain embedded use cases.LinkerBuilder type. (https://github.com/wasmi-labs/wasmi/pull/989)
LinkerBuilder to create new Linkers with the same set of host functions is a lot more
efficient than creating those Linkers the original way. However, the initial LinkerBuilder
construction will be as inefficient as building up a Linker previously.EnforcedLimits configuration option to Config. (https://github.com/wasmi-labs/wasmi/pull/985)
let mut config = wasmi::Config::default();
config.enforced_limits(wasmi::EnforcedLimits::strict());
In future updates we might relax this to make EnforcedLimits fully customizable.EngineWeak constructed via Engine::weak. (https://github.com/wasmi-labs/wasmi/pull/1003)
Engine.no-hash-maps crate feature to the wasmi crate. (https://github.com/wasmi-labs/wasmi/pull/1007)
wasmi crate to avoid using hash based data structures which can be beneficial for
running Wasmi in some embedded environments such as wasm32-unknown-unknown that do not support
random sources and thus are incapable to spawn hash maps that are resilient to malicious actors.Default implementation for Store<T> where T: Default. (https://github.com/wasmi-labs/wasmi/pull/1031)
WasmTy implementations for f32 and f64 Rust primitives. (https://github.com/wasmi-labs/wasmi/pull/1031)
Linker::func_wrap calls that take those primitives as arguments.
Before this change users had to use F32 and F64 instead which is a bit cumbersome.tail-calls and extend-const proposals by default. (https://github.com/wasmi-labs/wasmi/pull/849)
Debug and Display impls for NaNs of Wasm f32 and f64 values.
nan:0x{bytes} where {bytes} is their respective raw bytes.Sync for ResumableInvocation and TypedResumableInvocation. (https://github.com/wasmi-labs/wasmi/pull/870)Config::tail_call and Config::extended_const by default. (https://github.com/wasmi-labs/wasmi/pull/1031)
Engine backend. (https://github.com/wasmi-labs/wasmi/pull/818)
Engine is more promising
and the Wasmi team does not want to maintain two different engine backends.FuelConsumptionMode from Config. (https://github.com/wasmi-labs/wasmi/pull/877)
FuelConsumptionMode was required to differentiate between lazy and eager fuel consumption.
This was necessary due to how lazy fuel consumption was implemented in that it would pre-charge
for instruction execution were the exact amount of required fuel was not possible to determine
at compilation time. Examples are memory.grow and table.copy instructions. The linked PR
improved lazy fuel consumption to no longer pre-charge and instead pre-check if the operation
is going to succeed and only charge fuel in that case.dtolnay/rust-toolchain instead of actions-rs because the latter was deprecated. (https://github.com/wasmi-labs/wasmi/pull/842)Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Added ResourceLimiter API known from Wasmtime.
ResourceLimiter API known from Wasmtime. (https://github.com/wasmi-labs/wasmi/pull/737)
Module::len_globals internal API returned length of linear memories instead. (https://github.com/wasmi-labs/wasmi/pull/741)intx crate dependency. (https://github.com/wasmi-labs/wasmi/pull/727)
intx crate was accidental and not really required at any time.f64.const instructions for f64 constant values that can losslessly be encoded as 32-bit f32 value. (https://github.com/wasmi-labs/wasmi/pull/746)criterion 0.4.0 -> 0.5.0wast 0.52.0 -> 0.62.0Optimized Wasmi bytecode memory consumption.
call and return_call for Wasm module internal calls. (https://github.com/wasmi-labs/wasmi/pull/724)
Added support for extended-const Wasm proposal.
extended-const Wasm proposal. (https://github.com/wasmi-labs/wasmi/pull/707)table.copy and memory.grow.
Eager fuel consumption always consumes fuel before a bulk operation for the
total amount independent of success or failure of the operation whereras
lazy fuel consumption only consumes fuel for successful executions.Added support for the tail-call Wasm proposal.
tail-call Wasm proposal. (https://github.com/wasmi-labs/wasmi/pull/683)Linker defined host functions. (https://github.com/wasmi-labs/wasmi/pull/692)
wasmi_wasi crate now more closely mirrors the wasmtime_wasi crate API. (https://github.com/wasmi-labs/wasmi/pull/700)Store now handles Wasm functions and host functions separately. (https://github.com/wasmi-labs/wasmi/pull/686)
StoreInner type which was an important
step towards the major refactoring in (#694)ValueStackPtr abstraction for the Wasmi engine core. (https://github.com/wasmi-labs/wasmi/pull/688)
memory.{load,store} when reading or writing single bytes. (https://github.com/wasmi-labs/wasmi/pull/689)
StoreContextMut<T> instead of impl AsContextMut in the Wasmi engine core. (https://github.com/wasmi-labs/wasmi/pull/685)
StoreContextMut provides
more information to the compiler.Added support for fuel metering in the Wasmi CLI.
--fuel N to commit for the execution.
Upon success the Wasmi CLI will display the total amount of consumed and remaining fuel.--invoke x was provided and x was not found. (https://github.com/wasmi-labs/wasmi/pull/678)Config docs. (https://github.com/wasmi-labs/wasmi/pull/673)memory and bulk table operations. (https://github.com/wasmi-labs/wasmi/pull/676)
Fixed a bug where resuming a resumable function from a host function with more outputs than inputs could lead to incorrect behavior or runtime panics.
Big shoutout to Onigbinde Oluwamuyiwa Elijah for contributing this to Wasmi!
Pages::checked_sub method. (https://github.com/wasmi-labs/wasmi/pull/660)Func::new constructor. (https://github.com/wasmi-labs/wasmi/pull/662)
Func instances from closures without statically known types.wasmparser-nostd version 0.100.1. (https://github.com/wasmi-labs/wasmi/pull/666)wasmi_cli crate. (https://github.com/wasmi-labs/wasmi/pull/655)Added Config::floats option to enable or disable Wasm float operators during Wasm validation.
Config::floats option to enable or disable Wasm float operators during Wasm validation.Trap::downcast_mut and Trap::downcast methods. (https://github.com/wasmi-labs/wasmi/pull/650)
T: HostError.WasmType impls for FuncRef and ExternRef types. (https://github.com/wasmi-labs/wasmi/pull/642)
FuncRef and ExternRef instances to be used in TypedFunc parameters and results.From impls from wasmparser-nostd types to Wasmi types.
From<wasmparser::FuncType> for wasmi::FuncType got removed.wasmparser-nostd dependency from version 0.91.0 to 0.99.0. (https://github.com/wasmi-labs/wasmi/pull/640)Trap type is no longer Clone. (https://github.com/wasmi-labs/wasmi/pull/650)Added support for the [bulk-memory] Wasm proposal.
bulk-memory Wasm proposal. (https://github.com/wasmi-labs/wasmi/pull/628)reference-types Wasm proposal. (https://github.com/wasmi-labs/wasmi/pull/635)ValueType::{is_ref, is_num} methods. (https://github.com/wasmi-labs/wasmi/pull/635)Value::{i32, i64, f32, f64, externref, funcref} accessor methods to Value.Table and Memory imports not respecting the current size. (https://github.com/wasmi-labs/wasmi/pull/635)
Table and Memory imports
could incorrectly be rejected for having an invalid size for the subtype check.reference-types Wasm proposal implementation.Value type from wasmi_core to Wasmi. (https://github.com/wasmi-labs/wasmi/pull/636)
reference-types Wasm proposal.reference-types Wasm proposal which are listed below:
Value type no longer implements Copy and PartialEq.From<&Value> for UntypedValue impl has been removed.From impls for Value.Display impls for types like FuncType and Value to the wasmi_cli crate.try_into API from the Value type.
wast dependency from version 0.44 to 0.52. (https://github.com/wasmi-labs/wasmi/pull/632)3a04b2cf9> Note: This is the Wasmtime API Compatibility update.
Note: This is the Wasmtime API Compatibility update.
Module::get_export method. (https://github.com/wasmi-labs/wasmi/pull/617)ModuleError export from crate root. (https://github.com/wasmi-labs/wasmi/pull/618)
ModuleError is exported from crate::errors just like all the other error types.IntoFunc. (https://github.com/wasmi-labs/wasmi/pull/620)
Caller::host_data method to Caller::data.Caller::host_data_mut method to Caller::data_mut.Extern::ty method and the ExternType type.ExportItem to ExportType:
ExportItem::kind method to ty and return ExternType instead of ExportItemKind.ExportItemKind entirely.ExportsIter now yields items of the new type Export instead of pairs of (&str, Extern).ModuleImport to ImportType.
ImportType::item_type to ty.ImportType::field to name.&str lifetimes in ImportType::{module, name}.ModuleImportType by ExternType.Instance:
Instance::get_funcInstance::get_typed_funcInstance::get_globalInstance::get_tableInstance::get_memoryFunc::func_type => Func::tyGlobal::global_type => Global::tyTable::table_type => Table::tyMemory::memory_type => Memory::tyValue::value_type => Value::tyGlobal::value_type getter.
global.ty().content() instead.Global::is_mutable getter.
global.ty().mutability().is_mut() instead.Mutability::Mutable to Var.Mutability::is_mut getter.
TableType::initial method to minimum.Table::len method to size.Table and TableType now operate on u32 instead of usize just like in Wasmtime.
Table::{new, size, set, get, grow} methods and TableType::{new, minimum, maximum} methods and their users.Add missing TypedFunc::call_resumable API.
TypedFunc::call_resumable API. (https://github.com/wasmi-labs/wasmi/pull/605)
Func type.
However, there was no technical reason why it was not implemented
for TypedFunc so this mirrored API now exists.Func::call_resumable API.wasmi_core crate API. (https://github.com/wasmi-labs/wasmi/pull/607, https://github.com/wasmi-labs/wasmi/pull/608, https://github.com/wasmi-labs/wasmi/pull/609)
UntypedValue type gained some new methods to replace functionality
that was provided in parts by the removed traits.StoreContext new methods:
fn engine(&self) -> &Enginefn data(&self) -> &TStoreContextMut new methods:
fn engine(&self) -> &Enginefn data(&self) -> &Tfn data_mut(&mut self) -> &mut TStore::state method to Store::data.Store::state_mut method to Store::data_mut.Store::into_state method to Store::into_data.Store and Engine types are better decoupled from their generic parts. (https://github.com/wasmi-labs/wasmi/pull/610, https://github.com/wasmi-labs/wasmi/pull/611)
Add support for resumable function calls.
wasmi_wasi crate. (https://github.com/wasmi-labs/wasmi/pull/557)
wasmi_cli so that the Wasmi CLI will then
be able to execute arbitrary wasm-wasi files out of the box in the future.Module::imports that allows to query Wasm module imports. (https://github.com/wasmi-labs/wasmi/pull/573, https://github.com/wasmi-labs/wasmi/pull/583)wasmi::Trap type is now more similar to Wasmtime's Trap type. (https://github.com/wasmi-labs/wasmi/pull/559)wasmi::Store type is now Send and Sync as intended. (https://github.com/wasmi-labs/wasmi/pull/566)Removed some deprecated functions in the wasmi_core crate.
wasmi_core crate. (https://github.com/wasmi-labs/wasmi/pull/545)global.get of immutable non-imported globals. (https://github.com/wasmi-labs/wasmi/pull/533)
wasmi_core and Wasmi's executor.
Fixed a potential undefined behavior as reported by the miri tool with respect to its experimental stacked borrows.
miri tool
with respect to its experimental stacked borrows. (https://github.com/wasmi-labs/wasmi/pull/524)Linker::instantiate now takes &self instead of &mut self. (https://github.com/wasmi-labs/wasmi/pull/512)
Caller::new was public. (https://github.com/wasmi-labs/wasmi/pull/514)
TypedFunc::call at slight cost of Func::call. (https://github.com/wasmi-labs/wasmi/pull/522)
miri testing to Wasmi CI (https://github.com/wasmi-labs/wasmi/pull/523)Optimize for common cases for branch and return instructions.
S: impl AsContext generic parameter from Func::typed method.IntoFunc, WasmType and WasmRet traits publicly available.WasmRet for Result<T, Trap> where T: WasmType.
Func::wrap
that returned Result<T, Trap> where T: WasmType, only Result<(), Trap>
or Result<(T,), Trap> was possible before.wasmi_arena crate which defines all internally used arena data structures.
(https://github.com/wasmi-labs/wasmi/pull/502)clap 4.0 in wasmi_cli. (https://github.com/wasmi-labs/wasmi/pull/498)Added Contibution Guidelines and Code of Conduct to the repository.
Added Memory::data_and_store_mut API inspired by Wasmtime's API.
Memory::data_and_store_mut API inspired by Wasmtime's API. (https://github.com/wasmi-labs/wasmi/pull/448)wasmparser-nostd dependency from 0.90.0 to 0.91.0.
wasmi_core from 0.3.0 to 0.4.0.num-rational dependency from wasmi_core
for some nice speed-ups in compilation time of Wasmi itself.global.get and global.set Wasm instruction execution. (https://github.com/wasmi-labs/wasmi/pull/427)
criterion benchmarking framework to version 0.4.0.br_table translations. (https://github.com/wasmi-labs/wasmi/pull/440)clippy lints for Wasmi and wasmi_core. (https://github.com/wasmi-labs/wasmi/pull/438)Update wasmparser-nostd dependency from version 0.83.0 -> 0.90.0. Link:
wasmparser-nostd dependency from version 0.83.0 -> 0.90.0.
Link:
wasmparser::VisitOperator API.
Link
Fixed bugs found during fuzzing the translation phase of Wasmi. Link
Read trait implementation for no_std compilations.
Linkwasmi_core version 0.3.0.wasmi::Config in order to better reflect the API of
wasmtime::Config.Trap type to be of pointer size which resulted in significant
performance wins across the board especially for call intense work loads.
LinkVec based implementation.
Linkwasmi::Engine now caches the bytes of the default linear memory for
performance wins in memory.store and memory.load intense work loads.
LinkAdded support for the following Wasm proposals:
Added support for the following Wasm proposals:
We plan to support more Wasm proposals in the future.
Wasmi has been entirely redesigned and reimplemented.
This work resulted in an entirely new API that is heavily inspired by
the Wasmtime API,
a brand new Wasm execution engine that performs roughly 30-40%
better than the previous engine according to our benchmarks,
the support of many Wasm proposals and Wasm parsing and validation
using the battle tested wasmparser
crate by the BytecodeAlliance.
The new Wasmi design allows to reuse the Wasm execution engine resources instead of spinning up a new Wasm execution engine for every function call.
Note: If you plan to use Wasmi it is of critical importance
to compile Wasmi using the following Cargo profile settings:
[profile.release]
lto = "fat"
codegen-units = 1
If you do not use these profile settings you might risk regressing performance of Wasmi by up to 400%. You can read more about this issue here.
Support allocating 4GB of memory
Note: Yanked because of missing wasmi_core bump.
Note: Yanked because of missing wasmi_core bump.
Note: This is the last major release of the legacy Wasmi engine. Future releases are using the new Wasm execution engines that are currently in develo
Note: This is the last major release of the legacy Wasmi engine.
Future releases are using the new Wasm execution engines
that are currently in development.
We may consider to publish new major versions of this Wasm engine
as wasmi-legacy crate.
wasmi-validation v0.4.2 -> v0.5.0Deprecated RuntimeValue::decode_{f32,f64} methods.
wasmi_core crate.RuntimeValue::decode_{f32,f64} methods.
F32 and F64 types.
The RuntimeValue type provides from_bits methods for similar purposes.F{32,64}::from_bits().into() respectively.TrapKind to TrapCode.TrapCode definitions from the wasmi_core crate.parity-wasm v0.42 -> v0.45memory_units v0.3.0 -> v0.4.0RuntimeValue to Value internally.wat crate dependency instead of wabt for reading .wat files in tests.assert_matches: v1.1 -> v1.5rand 0.4.2 -> 0.8.2clippy warnings.Make Wasmi traps more conformant with the Wasm specification.
{f32, f64}_copysign implementations. (https://github.com/wasmi-labs/wasmi/pull/293){f32, f64}_{min, max} implementations. (https://github.com/wasmi-labs/wasmi/pull/295)LittleEndianConvert trait. (https://github.com/wasmi-labs/wasmi/pull/290)#[must_use]. (https://github.com/wasmi-labs/wasmi/pull/288)ValueStack so that only the live parts are printed.Audit crate dependencies for vulnerabilities.
region crate does:
https://github.com/darfink/region-rs#platformswasmi-validation crates now both use Rust edition 2021.README now better teaches how to test and benchmark the crate.num-rational from version 0.2.2 -> 0.4.0.MemoryInstance::get method.
MemoryInstance::get_value or MemoryInstance::get_into
methods instead.Vec
based fallback implementation anyways due to technical design.core crate feature that previously has been required for no_std builds.
--no-default-features for a no_std build.Added possibility to forward reduced_stack_buffers crate feature to parity-wasm crate.
reduced_stack_buffers crate feature to parity-wasm crate.rustfmt.toml configuration file.Updated parity-wasm from verion 0.41 to 0.42.
parity-wasm from verion 0.41 to 0.42.wasmi-validation from version 0.3.1 to 0.4.0.Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →