diff options
| author | Mica White <botahamec@outlook.com> | 2026-10-31 11:10:49 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2026-10-31 11:10:49 -0400 |
| commit | 264ea48cc8c6dd9c3c9e0fe1a559252863fc9962 (patch) | |
| tree | 84a4a58de14442f4fcfa06bd0d82480508f82759 /CHANGELOG.md | |
| parent | 7877eca4e8be283e7c51168ee3a3b05d9000f39c (diff) | |
| parent | b45a98a85c776d956a797773acd2f198c06b40ed (diff) | |
Merge branch 'main' into bota-tortuise
Diffstat (limited to 'CHANGELOG.md')
| -rw-r--r-- | CHANGELOG.md | 69 |
1 files changed, 60 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 79fb6b0..253f5a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,22 +9,73 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Added support for the WebAssembly function-references proposal -- Added `WasmValue::ty` and `WasmValue::matches_type` +- Added new `Memory::data` and `Memory::data_mut` methods for direct access to linear memory. +- Added several internal methods to support a future c-api crate + +## [0.11.0] - 2026-09-19 + +This release adds garbage collection and typed function reference support, single-pass parsing, and an optional tail-call dispatch backend. The internal instruction representation is now 8 bytes, down from 16, and pluggable memory backends were removed for performance reasons (however, `ResourceLimiter` was added to allow, reject, or trap memory allocation and growth requests). + +### Breaking Changes + +#### Functions and references + +- `Function::call` and `Function::call_resumable` now write to caller-provided result slices. Untyped host callbacks also receive a result slice and return `Result<()>`. +- Creating a `HostFunction` no longer requires a `Store`. Definitions require `Send + Sync` and can be reused across stores. +- Module instantiation now borrows `Imports`, allowing the same imports to be reused. +- `HostFunction::ty` and `WasmFunction::ty` were removed. Use `Function::ty(&Store)` for runtime types. +- Function and managed reference handles are tied to their originating `Store`. Managed references keep their referents live, so `WasmValue` is no longer `Copy`. +- Nullable typed references use `Option<T>`, while bare typed references are non-null. +- `WasmTupleChain` was removed. Use direct tuples up to arity 20 or untyped functions for larger signatures. +- `ToWasmTypes` was renamed to `WasmTypes`, and `ToWasmType` was renamed to `WasmValueType`. +- Conversion traits now include `WasmTypes`, and `FromWasmValues::from_wasm_values` rejects unconsumed values directly. + +#### Memory, tables, and stores + +- Pluggable memory backends and `Config::with_trap_on_oom` were removed for performance reasons. Linear memory is always `Vec`-backed. Use `ResourceLimiter` to allow, reject, or trap memory allocation and growth requests. +- The `Memory`, `Table`, `Global`, and `Tag` constructors were renamed from `new` to `try_new`. +- Element types now use `RefType`, and module definitions use `TableDefinition { ty, init }`. +- `Table::grow` now returns `Result<Option<usize>>`, matching `Memory::grow`. +- `Store::id` now returns `u32`, and `ModuleInstanceAddr` was renamed to `ModuleInstanceId`. + +#### Parser and archives + +- `Parser::new` now takes `ParserOptions`. Use `Parser::default()` for default settings. +- `Parser::with_options` was removed. +- `ParserOptions::optimize_rewrite` was renamed to `ParserOptions::optimize`. +- `ParserOptions::parser_threads` was renamed to `ParserOptions::threads`. +- The `.twasm` format changed. Regenerate archives created by earlier TinyWasm versions. + +### Added + +- Optional store-owned host state through `Store::with_state`, `Store::state`, and `Store::state_mut`. +- Support for the typed function references, garbage collection, exception handling, and compact import section proposals. +- `ResourceLimiter` callbacks for memory and table allocation or growth. +- A default-enabled `validate` Cargo feature and a parser option to skip WebAssembly validation. +- Optional parse-time operand deduplication to reduce `.twasm` archive size. +- Optional `send` support for moving stores and store-local handles across threads. +- Optional portable atomic shared pointers and counters for targets without native compare-and-swap. +- Optional `nightly-tail-calls` backend using Rust's unstable explicit tail calls for interpreter dispatch. ### Changed -- Function types are now stored separately and resolved through `Function::ty(&Store)`. +- Parsing now uses a single pass. +- Typed functions now support tuples up to arity 20 and `[u8; 16]` values for `v128`. +- Module types now use one recursive type space. +- Linear memory now uses contiguous `Vec`-backed storage. +- The internal instruction representation was reduced from 16 to 8 bytes. +- The minimum supported Rust version increased from 1.95 to 1.98. ### Fixed +- Failed instantiation now preserves complete element and data segment mappings for functions exposed through imported tables, and stops data initialization when element initialization traps. +- Stream parsing now bounds read increments instead of allocating declared section sizes up front, and retries interrupted reads. +- Reentrant host calls now enforce a separate depth limit based on the configured call-stack size instead of allowing unbounded native-stack recursion. +- Instantiation now rejects directly defined imports that contain handles from another `Store`. - Tail calls to host functions now return directly to the caller frame. - -### Breaking Changes - -- Renamed `ModuleInstanceAddr` to `ModuleInstanceId` for consistency. -- Removed `HostFunction::ty` and `WasmFunction::ty`. Use `Function::ty(&Store)` for runtime function types. -- Changed `TableType::element_type` and `Element::ty` from `WasmType` to `RefType`, and replaced module `table_types` with `TableDefinition { ty, init }`. +- Memory64 bulk-memory operations and optimized stores now use the correct value-stack lanes. +- `memory.init` now performs correct bounds checks and operand lowering. +- Memory64 now uses the correct default limits and host-size conversions, including on 32-bit targets. ## [0.10.0] - 2026-07-24 |
