Skip to content

Commit

Permalink
Prepare v0.32.0-beta.1 release (#858)
Browse files Browse the repository at this point in the history
* update changelog for v0.32.0-beta.1

* update changelog (again)

* bump crate versions
  • Loading branch information
Robbepop authored Dec 18, 2023
1 parent 86d0976 commit 85b17e9
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 21 deletions.
34 changes: 21 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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.32.0-beta.0`] - 2023-12-17
## [`0.32.0-beta.1`] - 2023-12-18

**Note:**

Expand All @@ -25,20 +25,26 @@ Dates in this file are formattes as `YYYY-MM-DD`.
### Added

- Added a new execution engine based on register-machine bytecode. (https://github.com/paritytech/wasmi/pull/729)
- The register-machine Wasmi `Engine` takes roughly 30% longer to compile Wasm to Wasmi bytecode
and executes roughly 80-100% faster according to benchmarks conducted so far.
- The register-machine Wasmi `Engine` executes roughly 80-100% faster and
compiles roughly 30% slower according to benchmarks conducted so far.
- Added `Module::new_unchecked` API. (https://github.com/paritytech/wasmi/pull/829)
- This allows to compile a Wasm module without Wasm validation which can be useful
when users know that their inputs are valid Wasm binaries.
- This improves Wasm compilation performance for faster startup times.
- Added optional lazy Wasm module compilation. (https://github.com/paritytech/wasmi/pull/844)
- Until now Wasmi used to eagerly compile all functions when creating a new Wasm module via `Module::new`.
This proved to be very costly, especially for very large Wasm modules. And since Wasm compilation became
even more costly with the new register-machine execution engine a new approach was needed.
Lazy compilation defers costly Wasm compilation until the first use of a Wasm function during execution.
- This greatly speeds up Wasm compilation performance, especially for bigger Wasm binaries.
- When paired with the new `Module::new_unchecked` we measured up to 27x faster compilation performance.
- With `Module::new` (Wasm validation) performance improvements are up to 3x.
- This improves Wasm compilation performance for faster startup times by roughly 10-20%.
- Added Wasm compilation modes. (https://github.com/paritytech/wasmi/pull/844)
- When using `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.
- The solution to this problem is to introduce new compilation modes, namely:
- `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.
- Benchmarks concluded that
- `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.
- Note that `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.
- Enable lazy Wasm compilation with:
```rust
let mut config = wasmi::Config::default();
Expand All @@ -48,7 +54,9 @@ Dates in this file are formattes as `YYYY-MM-DD`.
- This allows to quickly check if a Wasm binary is valid according to a Wasmi `Engine` config.
- Note that this does not translate the Wasm and thus `Module::new` or `Module::new_unchecked`
might still fail due to translation errors.
- CLI: Added `--lazy` argument to enable lazy Wasm compilation. (https://github.com/paritytech/wasmi/pull/849)
- CLI: Added `--compilation-mode` argument to enable lazy Wasm compilation. (https://github.com/paritytech/wasmi/pull/849)
- Improve `Debug` and `Display` impls for NaNs of Wasm `f32` and `f64` values.
- They now show `nan:0x{bytes}` where `{bytes}` is their respective raw bytes.

### Changed

Expand Down
6 changes: 3 additions & 3 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasmi_cli"
version = "0.32.0-beta.0"
version = "0.32.0-beta.1"
documentation = "https://docs.rs/wasmi/"
description = "WebAssembly interpreter"
authors.workspace = true
Expand All @@ -14,8 +14,8 @@ categories.workspace = true
[dependencies]
anyhow = "1"
clap = { version = "4", features = ["derive"] }
wasmi = { version = "0.32.0-beta.0", path = "../wasmi" }
wasmi_wasi = { version = "0.32.0-beta.0", path = "../wasi" }
wasmi = { version = "0.32.0-beta.1", path = "../wasmi" }
wasmi_wasi = { version = "0.32.0-beta.1", path = "../wasi" }
wat = "1"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasmi_core"
version = "0.14.0"
version = "0.15.0"
documentation = "https://docs.rs/wasmi_core"
description = "Core primitives for the wasmi WebAssembly interpreter"
authors.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions crates/wasi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasmi_wasi"
version = "0.32.0-beta.0"
version = "0.32.0-beta.1"
documentation = "https://docs.rs/wasmi_wasi"
description = "WASI library support for the wasmi interpreter"
authors.workspace = true
Expand All @@ -15,7 +15,7 @@ categories.workspace = true
wasi-common = "2.0"
wasi-cap-std-sync = "2.0"
wiggle = { version = "2.0", default-features = false, features = ["wiggle_metadata"] }
wasmi = { version = "0.32.0-beta.0", path = "../wasmi" }
wasmi = { version = "0.32.0-beta.1", path = "../wasmi" }

[dev-dependencies]
wat = "1.0.50"
Expand Down
4 changes: 2 additions & 2 deletions crates/wasmi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasmi"
version = "0.32.0-beta.0"
version = "0.32.0-beta.1"
documentation = "https://docs.rs/wasmi/"
description = "WebAssembly interpreter"
exclude = ["tests/*", "benches/*"]
Expand All @@ -14,7 +14,7 @@ categories.workspace = true

[dependencies]
wasmparser = { version = "0.100.1", package = "wasmparser-nostd", default-features = false }
wasmi_core = { version = "0.14", path = "../core", default-features = false }
wasmi_core = { version = "0.15", path = "../core", default-features = false }
wasmi_arena = { version = "0.4", path = "../arena", default-features = false }
spin = { version = "0.9", default-features = false, features = [
"mutex",
Expand Down

0 comments on commit 85b17e9

Please sign in to comment.