From 044d72640760aaf6b4164410cc0c1cf53252672a Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Tue, 31 Jan 2023 16:30:06 +0100 Subject: [PATCH] Prepare release for `wasmi` version `0.24.0` (#637) * bump versions of crates * update README Wasm proposal support * add initial CHANGELOG skeleton for v0.24.0 * update changelog for version 0.24.0 --- CHANGELOG.md | 40 ++++++++++++++++++++++++++++++++++++++++ README.md | 14 ++++++++------ crates/arena/Cargo.toml | 2 +- crates/cli/Cargo.toml | 4 ++-- crates/core/Cargo.toml | 2 +- crates/wasi/Cargo.toml | 2 +- crates/wasmi/Cargo.toml | 6 +++--- 7 files changed, 56 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c68d4e0ef3..17e42d7702 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,46 @@ Additionally we have an `Internal` section for changes that are of interest to d Dates in this file are formattes as `YYYY-MM-DD`. +## [`0.24.0`] - 2023-01-31 + +### Added + +- Added support for the [`bulk-memory`] Wasm proposal. (https://github.com/paritytech/wasmi/pull/628) +- Added support for the [`reference-types`] Wasm proposal. (https://github.com/paritytech/wasmi/pull/635) +- Added `ValueType::{is_ref, is_num`} methods. (https://github.com/paritytech/wasmi/pull/635) +- Added `Value::{i32, i64, f32, f64, externref, funcref}` accessor methods to `Value`. + +[`bulk-memory`]: https://github.com/WebAssembly/bulk-memory-operations +[`reference-types`]: https://github.com/WebAssembly/reference-types + +### Fixed + +- Fix a bug with `Table` and `Memory` imports not respecting the current size. (https://github.com/paritytech/wasmi/pull/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. (https://github.com/paritytech/wasmi/pull/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`. (https://github.com/paritytech/wasmi/pull/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`. (https://github.com/paritytech/wasmi/pull/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. + ## [`0.23.0`] - 2023-01-19 > **Note:** This is the Wasmtime API Compatibility update. diff --git a/README.md b/README.md index e8d8a0b4ce..285804820e 100644 --- a/README.md +++ b/README.md @@ -51,12 +51,12 @@ The new `wasmi` engine supports a variety of WebAssembly proposals and will supp | WebAssembly Proposal | Status | Comment | |:--|:--:|:--| -| [`mutable-global`] | ✅ | | -| [`saturating-float-to-int`] | ✅ | | -| [`sign-extension`] | ✅ | | -| [`multi-value`] | ✅ | | -| [`bulk-memory`] | ⌛ | Support is planned. [(#364)] | -| [`reference-types`] | ⌛ | Support is planned. [(#496)] | +| [`mutable-global`] | ✅ | Since version `0.14.0`. | +| [`saturating-float-to-int`] | ✅ | Since version `0.14.0`. | +| [`sign-extension`] | ✅ | Since version `0.14.0`. | +| [`multi-value`] | ✅ | Since version `0.14.0`. | +| [`bulk-memory`] | ✅ | Since version `0.24.0`. [(#628)] | +| [`reference-types`] | ✅ | Since version `0.24.0`. [(#635)] | | [`simd`] | ❌ | Unlikely to be supported. | | [`tail-calls`] | ⌛ | Support is planned. [(#363)] | | | | @@ -76,6 +76,8 @@ The new `wasmi` engine supports a variety of WebAssembly proposals and will supp [(#363)]: https://github.com/paritytech/wasmi/issues/363 [(#364)]: https://github.com/paritytech/wasmi/issues/364 [(#496)]: https://github.com/paritytech/wasmi/issues/496 +[(#628)]: https://github.com/paritytech/wasmi/pull/628 +[(#635)]: https://github.com/paritytech/wasmi/pull/635 ## Usage diff --git a/crates/arena/Cargo.toml b/crates/arena/Cargo.toml index d35ff137ff..38e2447221 100644 --- a/crates/arena/Cargo.toml +++ b/crates/arena/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmi_arena" -version = "0.3.0" +version = "0.4.0" documentation = "https://docs.rs/wasmi_arena/" description = "Entity arena data structures for wasmi" exclude = ["tests/*", "benches/*"] diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index c9da9b887a..d01690c4e0 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmi_cli" -version = "0.23.1" +version = "0.24.0" documentation = "https://docs.rs/wasmi/" description = "WebAssembly interpreter" publish = true @@ -14,7 +14,7 @@ categories.workspace = true [dependencies] clap = { version = "4", features = ["derive"] } -wasmi = { path = "../wasmi", version = "0.23.0" } +wasmi = { path = "../wasmi", version = "0.24.0" } wat = "1" anyhow = "1" diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index 8a467be357..52f37015e9 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmi_core" -version = "0.8.0" +version = "0.9.0" documentation = "https://docs.rs/wasmi_core" description = "Core primitives for the wasmi WebAssembly interpreter" authors.workspace = true diff --git a/crates/wasi/Cargo.toml b/crates/wasi/Cargo.toml index 693a0e8fe3..15d72cf377 100644 --- a/crates/wasi/Cargo.toml +++ b/crates/wasi/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" wasi-common = "2.0" wasi-cap-std-sync = "2.0" wiggle = { version = "2.0", default-features = false, features = ["wiggle_metadata"] } -wasmi = { version = "0.23.0", path = "../wasmi" } +wasmi = { version = "0.24.0", path = "../wasmi" } [dev-dependencies] wat = "1.0.50" diff --git a/crates/wasmi/Cargo.toml b/crates/wasmi/Cargo.toml index e3c03b4ef8..352391fc15 100644 --- a/crates/wasmi/Cargo.toml +++ b/crates/wasmi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmi" -version = "0.23.0" +version = "0.24.0" documentation = "https://docs.rs/wasmi/" description = "WebAssembly interpreter" exclude = ["tests/*", "benches/*"] @@ -14,8 +14,8 @@ categories.workspace = true [dependencies] wasmparser = { version = "0.91", package = "wasmparser-nostd", default-features = false } -wasmi_core = { version = "0.8", path = "../core", default-features = false } -wasmi_arena = { version = "0.3", path = "../arena", default-features = false } +wasmi_core = { version = "0.9", path = "../core", default-features = false } +wasmi_arena = { version = "0.4", path = "../arena", default-features = false } spin = { version = "0.9", default-features = false, features = [ "mutex", "spin_mutex",