Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare release for Wasmi v0.37.0 #1210

Merged
merged 5 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,53 @@ 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.37.0`] - 2024-30-09

### Added

- Added support for Wasm `multi-value` proposal. [#1191]
- Added `Store::call_hook` API. [#1144]
- Contributed by [emiltayl](https://github.com/emiltayl).

### Changed

- Updated WASI dependencies. [#1140]
- This fixes some long-standing bugs in the `wasmi_wasi` crate.

### Fixed

- This release includes all fixes that have been backported to `v0.36.1` and `v0.36.2`.

### Internal

- Add new Wasmi bytecode. [#1152]
- This was a major undertaking with lots of sub-issues and PRs.
- The Wasmi bytecode definitions now reside in their own [`wasmi_ir` crate].
- Most of the definitions are sourced from a single Rust macro to reduce maintenance friction.
- Remove unnecessary `iextend` instructions. [#1147]
- Changed encoding for Wasmi `call_indirect` instructions. [#1156]
- The new encoding improves performance and reduces the number of function local constants.
- Changed encoding for Wasmi `select` instructions. [#1157]
- The new encoding is more straight-forward and aims to simplify the Wasmi executor and translator.
- Changed encoding for Wasmi `br_table` instruction. [#1158]
- The new encoding improves performance and memory consumption for certain use cases.
- Minor improvements to Wasmi bytecode.
- `MemoryGrowBy` now takes `u32` delta. [#1193]
- Improved `storeN` encoding with immediates. [#1194]

[#1144]: https://github.com/wasmi-labs/wasmi/pull/1144
[#1147]: https://github.com/wasmi-labs/wasmi/pull/1147
[#1140]: https://github.com/wasmi-labs/wasmi/pull/1140
[#1152]: https://github.com/wasmi-labs/wasmi/pull/1152
[#1156]: https://github.com/wasmi-labs/wasmi/pull/1156
[#1157]: https://github.com/wasmi-labs/wasmi/pull/1157
[#1158]: https://github.com/wasmi-labs/wasmi/pull/1158
[#1191]: https://github.com/wasmi-labs/wasmi/pull/1191
[#1193]: https://github.com/wasmi-labs/wasmi/pull/1193
[#1194]: https://github.com/wasmi-labs/wasmi/pull/1194

[`wasmi_ir` crate]: https://crates.io/crates/wasmi_ir

## [`0.36.2`] - 2024-28-09

### Fixed
Expand Down
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ resolver = "2"
[workspace.package]
authors = ["Robin Freyler <robin.freyler@gmail.com>"]
repository = "https://github.com/wasmi-labs/wasmi"
version = "0.36.0"
version = "0.37.0"
rust-version = "1.79"
edition = "2021"
readme = "README.md"
Expand All @@ -26,13 +26,13 @@ categories = ["wasm", "no-std", "virtualization"]
exclude = ["tests"]

[workspace.dependencies]
wasmi = { version = "0.36.0", path = "crates/wasmi", default-features = false }
wasmi_wasi = { version = "0.36.0", path = "crates/wasi", default-features = false }
wasmi_core = { version = "0.36.0", path = "crates/core", default-features = false }
wasmi_ir = { version = "0.36.0", path = "crates/ir", default-features = false }
wasmi_collections = { version = "0.36.0", path = "crates/collections", default-features = false }
wasmi_c_api_impl = { version = "0.36.0", path = "crates/c_api" }
wasmi_c_api_macros = { version = "0.36.0", path = "crates/c_api/macro" }
wasmi = { version = "0.37.0", path = "crates/wasmi", default-features = false }
wasmi_wasi = { version = "0.37.0", path = "crates/wasi", default-features = false }
wasmi_core = { version = "0.37.0", path = "crates/core", default-features = false }
wasmi_ir = { version = "0.37.0", path = "crates/ir", default-features = false }
wasmi_collections = { version = "0.37.0", path = "crates/collections", default-features = false }
wasmi_c_api_impl = { version = "0.37.0", path = "crates/c_api" }
wasmi_c_api_macros = { version = "0.37.0", path = "crates/c_api/macro" }
num-traits = { version = "0.2.8", default-features = false }

[profile.bench]
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ The new Wasmi engine supports a variety of WebAssembly proposals and will suppor

| WebAssembly Proposal | Status | Comment |
|:--|:--:|:--|
| [`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)] |
| [`mutable-global`] | ✅ | `0.14.0`. |
| [`saturating-float-to-int`] | ✅ | `0.14.0`. |
| [`sign-extension`] | ✅ | `0.14.0`. |
| [`multi-value`] | ✅ | `0.14.0`. |
| [`bulk-memory`] | ✅ | `0.24.0`. [(#628)] |
| [`reference-types`] | ✅ | `0.24.0`. [(#635)] |
| [`simd`] | ❌ | Unlikely to be supported. |
| [`tail-calls`] | ✅ | Since version `0.28.0`. [(#683)] |
| [`extended-const`] | ✅ | Since version `0.29.0`. [(#707)] |
| [`multi-memory`] | ✅ | Implemented but not yet released. Use `main` branch. |
| [`tail-calls`] | ✅ | `0.28.0`. [(#683)] |
| [`extended-const`] | ✅ | `0.29.0`. [(#707)] |
| [`multi-memory`] | ✅ | ≥ `0.37.0`. [(#1191)] |
| [`function-references`] | 📅 | Planned but not yet implemented. [(#774)] |
| [`gc`] | 📅 | Planned but not yet implemented. [(#775)] |
| [`threads`] | 📅 | Planned but not yet implemented. [(#777)] |
Expand Down Expand Up @@ -112,6 +112,7 @@ The new Wasmi engine supports a variety of WebAssembly proposals and will suppor
[(#1036)]: https://github.com/wasmi-labs/wasmi/issues/1136
[(#1037)]: https://github.com/wasmi-labs/wasmi/issues/1137
[(#1197)]: https://github.com/wasmi-labs/wasmi/issues/1197
[(#1191)]: https://github.com/wasmi-labs/wasmi/issues/1191

## Development

Expand Down
22 changes: 12 additions & 10 deletions crates/ir/src/enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,19 @@ macro_rules! define_enum {
) => {
/// A Wasmi instruction.
///
/// Actually Wasmi instructions are composed of so-called instruction words.
/// In fact this type represents single instruction words but for simplicity
/// we call the type [`Instruction`] still.
/// Most instructions are composed of a single instruction words. An example of
/// this is [`Instruction::I32Add`]. However, some instructions like
/// [`Instruction::Select`] are composed of two or more instruction words.
/// The Wasmi bytecode translation phase makes sure that those instruction words
/// always appear in valid sequences. The Wasmi executor relies on this guarantee.
/// The documentation of each [`Instruction`] variant describes its encoding in the
/// Wasmi instructions are composed of so-called instruction words.
/// This type represents all such words and for simplicity we call the type [`Instruction`], still.
///
/// Most instructions are composed of a single instruction word. An example of
/// this is [`Instruction::I32Add`]. However, some instructions, like
/// [`Instruction::Select`], are composed of two or more instruction words.
///
/// The Wasmi bytecode translation makes sure that instructions always appear in valid sequences.
/// The Wasmi executor relies on the guarantees that the Wasmi translator provides.
///
/// The documentation of each [`Instruction`] describes its encoding in the
/// `#Encoding` section of its documentation if it requires more than a single
/// instruction word for its encoding.
/// instruction for its encoding.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[repr(u16)]
pub enum Instruction {
Expand Down
Loading