Skip to content

v2.0.0 - 2026/09/01

Latest

Choose a tag to compare

@github-actions github-actions released this 01 Sep 11:56
v2.0.0
2970aa8

Upgrading from Wasmi 1.x? Please refer to the
Wasmi v1 to v2 migration guide
which lists all the changes that require action from users.

Wasmi 2.0.0 includes all changes of the 2.0.0-beta.0 up to 2.0.0-beta.10 releases.
Since those are far too many to repeat here, this entry only lists the highlights.
For the complete, PR-by-PR record please refer to the respective beta release entries:

Highlights

A completely new interpreter core

  • Wasmi has an entirely new internal IR and executor. 🚀 #1655
    • Benchmarks conclude that Wasmi v2.0 is geomean roughly 2.2x faster than Wasmi v1.0.
  • Wasmi IR operators now store their results in accumulator registers, the same
    interpreter architecture used by the fastest Wasm interpreters, Wasm3 and Stitch.
    • PRs: #1827 #1855
    • Benchmarks concluded that Wasmi is on par and sometimes even exceeds performance
      of its competition now.
  • Wasmi's executor now uses fixed 64-bit cells. #1755
    • Enabling the simd crate feature no longer affects memory consumption or
      execution performance of non-simd Wasm code.
  • Operator dispatch is tail-call based on targets that are known to support it and
    falls back to the portable (loop-based) dispatch automatically via the new
    default-enabled auto-dispatch crate feature. #1968
  • Re-designed CodeMap to be lock-free and append-only significantly improving Wasm to Wasm call performance.
  • A new InstanceEntity layout plus caching greatly improved access to all instance related
    data, namely Func, Global, Memory, Table, Data and Elem.
    • PRs: #1940 #1996 #1997
    • Despite Wasmi's module independent bytecode, instance access is now as efficient as in
      Wasm3's or Stitch'es executors with their instance-related bytecodes.
    • The count/globals benchmark improved by a whopping ~35%.
    • wasmi::Table elements shrank from 64-bit (or even 128-bit with the simd crate feature
      enabled) to flat 32-bit references, shrinking Wasm tables by a factor of 2-4x.

Binary artifact size

  • Added a new validate crate feature that controls whether Wasmi supports Wasm validation. #1902
    • Users who have full control over the Wasm inputs to Wasmi can reduce binary artifact
      sizes by ~200-300kB by disabling it.
  • Support for memory64 is now optional via the memory64 crate feature. #1934
  • Richer Op debug output moved behind a new, default-disabled debug crate feature and
    generic monomorphization in translation was replaced by explicit V-Tables.

Fuel metering

  • Wasmi's fuel metering is now stable: it is tied to the input Wasm bytecode instead of
    Wasmi's internal bytecode. #2013
    • While less precise, it stays relatively stable and is the same technique
      that is also used in Wasmtime.
  • Fuel costs can now be customized via the new Config::operator_cost and
    Config::fuel_cost APIs. #2025

Crate Features & configuration

  • Added support for the Wasm deterministic profile via the new deterministic crate feature. #1947
  • Added a Config option to disallow running the start function of Wasm modules. #1985
  • Added a new libm crate feature to enforce libm usage. #1860
  • Added a new unstable crate feature which enables Rust's unstable become keyword to
    enforce tail calls in Wasmi's operator dispatch on nightly Rust. #1825
  • Added richer error information to Wasm module instantiation errors. #1962 #1963
  • The Wasmi C-API now forwards most crate features exposed by wasmi, including
    portable-dispatch, and properly supports no_std.

CLI

  • The Wasmi CLI command has been renamed from wasmi_cli to just wasmi and, similar to
    Wasmtime's CLI, now features the run and wast sub-commands. #1798 #1799
  • Added new wasmi_cli crate features: wasi, wast, run, portable-dispatch
    and indirect-dispatch.