Skip to content

Releases: wasmi-labs/wasmi

v0.24.0 - 2023-01-31

31 Jan 15:56
v0.24.0
044d726
Compare
Choose a tag to compare

Added

  • Added support for the bulk-memory Wasm proposal. (#628)
  • Added support for the reference-types Wasm proposal. (#635)
  • Added ValueType::{is_ref, is_num} methods. (#635)
  • Added Value::{i32, i64, f32, f64, externref, funcref} accessor methods to Value.

Fixed

  • Fix a bug with Table and Memory imports not respecting the current size. (#635)
    • This sometimes led to the problem that valid Table and Memory imports
      could incorrectly be rejected for having an invalid size for the subtype check.
    • This has been fixed as part of the reference-types Wasm proposal implementation.

Changed

  • Use more references in places to provide the compiler with more optimization opportunities. (#634)
    • This led to a speed-up across the board for Wasm targets of about 15-20%.
  • Move the Value type from wasmi_core to wasmi. (#636)
    • This change was necessary in order to support the reference-types Wasm proposal.
  • There has been some consequences from implementing the reference-types Wasm proposal which are listed below:
    • The Value type no longer implements Copy and PartialEq.
    • The From<&Value> for UntypedValue impl has been removed.
    • Remove some From impls for Value.
    • Moved some Display impls for types like FuncType and Value to the wasmi_cli crate.
    • Remove the try_into API from the Value type.
      • Users should use the new accessor methods as in the Wasmtime API.

Internal

  • Update wast dependency from version 0.44 to 0.52. (#632)
  • Update the Wasm spec testsuite to the most recent commit: 3a04b2cf9
  • Improve error reporting for the internal Wasm spec testsuite runner.
    • It will now show proper span information in many more cases.

v0.23.0 - 2023-01-19

19 Jan 12:30
v0.23.0
2972a15
Compare
Choose a tag to compare

Note: This is the Wasmtime API Compatibility update.

Added

  • Add Module::get_export method. (#617)

Changed

  • Removed ModuleError export from crate root. (#618)
    • Now ModuleError is exported from crate::errors just like all the other error types.
  • Refactor and cleanup traits underlying to IntoFunc. (#620)
    • This is only the first step in moving closer to the Wasmtime API traits.
  • Mirror Wasmtime API more closely. (#615, #616)
    • Renamed Caller::host_data method to Caller::data.
    • Renamed Caller::host_data_mut method to Caller::data_mut.
    • Add Extern::ty method and the ExternType type.
    • Rename ExportItem to ExportType:
      • Rename the ExportItem::kind method to ty and return ExternType instead of ExportItemKind.
      • Remove the no longer used ExportItemKind entirely.
    • The ExportsIter now yields items of the new type Export instead of pairs of (&str, Extern).
    • Rename ModuleImport to ImportType.
      • Rename ImportType::item_type to ty.
      • Rename ImportType::field to name.
      • Properly forward &str lifetimes in ImportType::{module, name}.
      • Replace ModuleImportType by ExternType.
    • Add new convenience methods to Instance:
      • Instance::get_func
      • Instance::get_typed_func
      • Instance::get_global
      • Instance::get_table
      • Instance::get_memory
    • Rename getters for querying types of runtime objects:
      • Func::func_type => Func::ty
      • Global::global_type => Global::ty
      • Table::table_type => Table::ty
      • Memory::memory_type => Memory::ty
      • Value::value_type => Value::ty
    • Remove Global::value_type getter.
      • Use global.ty().content() instead.
    • Remove Global::is_mutable getter.
      • Use global.ty().mutability().is_mut() instead.
    • Rename Mutability::Mutable to Var.
    • Add Mutability::is_mut getter.
      • While this API is not included in Wasmtime it is a useful convenience method.
    • Rename TableType::initial method to minimum.
    • Rename Table::len method to size.
    • Table and TableType now operate on u32 instead of usize just like in Wasmtime.
      • This affects Table::{new, size, set, get, grow} methods and TableType::{new, minimum, maximum} methods and their users.

v0.22.0 - 2023-01-16

16 Jan 19:57
v0.22.0
0bbb80c
Compare
Choose a tag to compare

Added

  • Add missing TypedFunc::call_resumable API. (#605)
    • So far resumable calls were only available for the Func type.
      However, there was no technical reason why it was not implemented
      for TypedFunc so this mirrored API now exists.
    • This also cleans up rough edges with the Func::call_resumable API.

Changed

  • Clean up the wasmi_core crate API. (#607, #608, #609)
    • This removes plenty of traits from the public interface of the crate
      which greatly simplifies the API surface for users.
    • The UntypedValue type gained some new methods to replace functionality
      that was provided in parts by the removed traits.
  • The wasmi crate now follows the Wasmtime API a bit more closely. (#613)
    • StoreContext new methods:
      • fn engine(&self) -> &Engine
      • fn data(&self) -> &T
    • StoreContextMut new methods:
      • fn engine(&self) -> &Engine
      • fn data(&self) -> &T
      • fn data_mut(&mut self) -> &mut T
    • Renamed Store::state method to Store::data.
    • Renamed Store::state_mut method to Store::data_mut.
    • Renamed Store::into_state method to Store::into_data.

Internal

  • The Store and Engine types are better decoupled from their generic parts. (#610, #611)
    • This might reduce binary bloat and may have positive effects on the performance.
      In fact we measured significant performance improvements on the Wasm target.

v0.21.0 - 2023-01-04

04 Jan 15:10
v0.21.0
9e228e8
Compare
Choose a tag to compare

Added

  • Add support for resumable function calls. (#598)
    • This feature allows to resume a function call upon encountering a host trap.
  • Add support for concurrently running function executions using a single wasmi engine.
    • This feature also allows to call Wasm functions from host functions. (#590)
  • Add initial naive WASI support for wasmi using the new wasmi_wasi crate. (#557)
    • Special thanks to Onigbinde Oluwamuyiwa Elijah for carrying the WASI support efforts!
    • Also thanks to Yuyi Wang for testing and improving initial WASI support. (#592, #571, #568)
    • Note: There is ongoing work to integrate WASI support in wasmi_cli so that the wasmi CLI will then
      be able to execute arbitrary wasm-wasi files out of the box in the future.
  • Add Module::imports that allows to query Wasm module imports. (#573, #583)

Fixed

  • Fix a bug that imported linear memories and tables were initialized twice upon instantiation. (#593)
  • The wasmi CLI now properly hints for file path arguments. (#596)

Changed

  • The wasmi::Trap type is now more similar to Wasmtime's Trap type. (#559)
  • The wasmi::Store type is now Send and Sync as intended. (#566)
  • The wasmi CLI now prints exported functions names if the function name CLI argument is missing. (#579)
  • Improve feedback when running a Wasm module without exported function using wasmi CLI. (#584)

v0.20.0 - 2022-11-04

04 Nov 11:39
v0.20.0
fdc136f
Compare
Choose a tag to compare

Added

  • Added contribution documentation about fuzz testing. (#529)

Removed

  • Removed some deprecated functions in the wasmi_core crate. (#545)

Fixed

  • Fixed a critical performance regression introduced in Rust 1.65. (#518)
    • While the PR's main job was to clean up some code it was found out that it
      also fixes a critical performance regression introduced in Rust 1.65.
    • You can read more about this performance regression in this thread.

Changed

  • Fixed handling of edge cases with respect to Wasm linear memory. (#449)
    • This allows for wasmi to properly setup and use linear memory instances of up to 4GB.
  • Optimize and improve Wasm instantiation. (#531)
  • Optimize global.get of immutable non-imported globals. (#533)
    • Also added a benchmark test for this. (#532)

Internal

  • Implemented miscellaneous improvements to our CI system.
  • Miscellaneous clean ups in wasmi_core and wasmi's executor.

v0.19.0 - 2022-10-20

20 Oct 14:48
v0.19.0
f3f42b1
Compare
Choose a tag to compare

Fixed

  • Fixed a potential undefined behavior as reported by the miri tool
    with respect to its experimental stacked borrows. (#524)

Changed

  • Optimized Wasm to wasmi translation phase by removing unnecessary Wasm
    validation type checks. (#527)
    • Speedups were in the range of 15%.
  • Linker::instantiate now takes &self instead of &mut self. (#512)
    • This allows users to easily predefine a linker and reused its definitions
      as shared resource.
  • Fixed a bug were Caller::new was public. (#514)
    • It is now a private method as it was meant to be.
  • Optimized TypedFunc::call at slight cost of Func::call. (#522)
    • For many parameters and return values the measured improvements are in the range of 25%.
      Note that this is only significant for a large amount of host to Wasm calls of small functions.

Internal

  • Added new benchmarks and cleaned up benchmarking code in general.
  • Add miri testing to wasmi CI (#523)

v0.18.1 - 2022-10-13

13 Oct 09:02
v0.18.1
6d4d679
Compare
Choose a tag to compare

Changed

  • Optimize for common cases for branch and return instructions.
    (#493)
    • This led to up to 10% performance improvement according to our benchmarks
      in some cases.
  • Removed extraneous S: impl AsContext generic parameter from Func::typed method.
  • Make IntoFunc, WasmType and WasmRet traits publicly available.
  • Add missing impl for WasmRet for Result<T, Trap> where T: WasmType.
    • Without this impl it was impossible to provide closures to Func::wrap
      that returned Result<T, Trap> where T: WasmType, only Result<(), Trap>
      or Result<(T,), Trap> was possible before.

Internal

  • Added wasmi_arena crate which defines all internally used arena data structures.
    (#502)
  • Update to clap 4.0 in wasmi_cli. (#498)
  • Many more improvements to our internal benchmarking CI.
    (#494, #501,
    #506, #509)

v0.18.0 - 2022-10-02

02 Oct 12:32
v0.18.0
6780731
Compare
Choose a tag to compare

Added

  • Added Contibution Guidelines and Code of Conduct to the repository. (#485)

Changed

  • Optimized instruction dispatch in the wasmi interpreter.
    (#478, #482)
    • This yielded combined speed-ups of ~20% across the board.
    • As a side effect we also refactored the way we compute branching offsets
      at Wasm module compilation time which improved performance of Wasm module
      compilation by roughly 5%.

Internal

  • Our CI now also benchmarks wasmi when ran inside Wasmtime as Wasm.
    (#483, #487)
    • This allows us to optimize wasmi towards Wasm performance more easily in the future.

v0.17.0 - 2022-09-23

23 Sep 18:17
v0.17.0
fc58331
Compare
Choose a tag to compare

Added

  • Added Memory::data_and_store_mut API inspired by Wasmtime's API. (#462)

Changed

  • Updated wasmparser-nostd dependency from 0.90.0 to 0.91.0.
    • This improved performance of Wasm module compilation by ~10%.
  • Updated wasmi_core from 0.3.0 to 0.4.0.
  • Optimized execution of several Wasm float to int conversion instructions. (#439)
    • We measured a performance improvement of 6000% or in other words those
      instructions are now 60 times faster than before.
    • This allowed us to remove the big num-rational dependency from wasmi_core
      for some nice speed-ups in compilation time of wasmi itself.
  • Optimized global.get and global.set Wasm instruction execution. (#427)
    • This improved performance of those instructions by up to 17%.
  • Optimized Wasm value stack emulation. (#459)
    • This improved performance of compute intense workloads by up to 23%.

Internal

  • Added automated continuous benchmarking to wasmi. (#422)
    • This allows us to have a more consistent overview over the performance of wasmi.
  • Updated criterion benchmarking framework to version 0.4.0.
  • Reuse allocations during Wasm validation and translation:
    • Wasm validation and translation combined. (#462)
    • Wasm br_table translations. (#440)
  • Enabled more useful clippy lints for wasmi and wasmi_core. (#438)
  • Reorganized the wasmi workspace. (#466)

v0.13.2 - 2022-09-20

20 Sep 13:23
ce5a1b4
Compare
Choose a tag to compare

Note: This is going to be the last release with the legacy wasmi engine.
Future releases are going to use the new Wasm execution engines
that are currently in development.
We may consider to publish the legacy wasmi engine as wasmi-legacy
crate.

Fixed

  • Support allocating 4GB of memory (#452)