You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This release is a major runtime and API rework. It adds support for several newer WebAssembly proposals, introduces the new `Engine` configuration API, rewrites large parts of execution and validation, and changes the internal `twasm` archive format. Benchmarks in the repository currently show roughly 30-90% improvement over 0.8.0 depending on workload and execution mode.
11
13
12
14
### Added
13
15
14
16
- Support for the `custom_page_sizes` proposal ([#22](https://github.com/explodingcamera/tinywasm/pull/22) by [@danielstuart14](https://github.com/danielstuart14))
15
17
- Support for the `tail_call`, `memory64`, `simd`, `relaxed_simd`, `wide_arithmetic`, and `extended_const` proposals ([#37](https://github.com/explodingcamera/tinywasm/pull/37), [#38](https://github.com/explodingcamera/tinywasm/pull/38), [#39](https://github.com/explodingcamera/tinywasm/pull/39))
16
-
- Parse-only support for the `annotations` proposal
17
18
- New `Engine` API (`tinywasm::Engine` and `engine::Config`) for runtime configuration
18
19
- Resumable execution APIs: `call_resumable`, `resume_with_fuel`, `resume_with_time_budget`, and `ExecProgress`
19
20
- Host-function fuel APIs: `FuncContext::charge_fuel` and `FuncContext::remaining_fuel`
@@ -24,19 +25,18 @@ This release is a major runtime and API rework. It adds support for several newe
24
25
25
26
### Changed
26
27
27
-
-`Store::new` now takes an `Engine`; use `Store::default()` for default settings.
28
+
-`Store::new` now takes an `Engine`, use `Store::default()` for default settings.
28
29
-`ModuleInstance::func` now validates exact Wasm signatures at lookup time and fails immediately on mismatches.
29
-
- Stack and call-stack limits now come from `engine::Config`, and memory allocation is lazy until first access.
30
-
- Module-internal by-index inspection APIs are now gated behind `guest-debug`, and runtime `Debug` implementations are gated behind `debug`.
31
-
-`Module` is now re-exported directly from `tinywasm_types`; the `module` submodule was removed.
30
+
- Stack and call-stack limits can now be defined with `engine::Config`
31
+
- Module-internal by-index inspection APIs are now gated behind `guest-debug`
32
+
-`Debug` implementations are now gated behind `debug`.
32
33
- MSRV increased to 1.95 and the crate now uses Rust 2024.
33
34
-`Error`, `Trap`, and `LinkingError` are now `#[non_exhaustive]`.
34
-
-`Trap` variant discriminants changed; do not rely on casting variants to integers.
35
35
-`HostFunction::new`, `HostFunction::func`, and `HostFunction::typed` now require `&mut Store`, and `Imports::link_module` now takes a `ModuleInstance` instead of a raw module instance id.
36
36
- Cargo features were renamed from `tinywasm-parser` to `parser` and from `logging` to `log`.
37
37
-`Error::ParseError` was renamed to `Error::Parser`, and `Error::Twasm` was added.
38
38
-`FuncHandle` and `FuncHandleTyped` were renamed to `Function` and `FunctionTyped`, and module export lookups moved from `exported_*` to `func_untyped`, `func`, and `memory`.
39
-
- The `twasm` archive format is now postcard-based and backwards-incompatible with previous versions (thanks [@dragonnn](https://github.com/dragonnn)).
39
+
- The `twasm` archive format is now based on postcard (backwards-incompatible with previous versions) (thanks [@dragonnn](https://github.com/dragonnn)).
40
40
- The interpreter was refactored around more superinstruction fusion, lower-overhead dispatch, typed-stack locals, jump-oriented lowering, and optional parallel parsing.
41
41
42
42
### Removed
@@ -51,7 +51,7 @@ This release is a major runtime and API rework. It adds support for several newe
51
51
### Fixed
52
52
53
53
- Fixed archive **no_std** support, which was broken in the previous release, and added tests to ensure it stays working.
54
-
-`ModuleInstance::memory` and `FuncContext::memory`are now actually immutable ([#41](https://github.com/explodingcamera/tinywasm/pull/41)).
54
+
-`ModuleInstance::memory` and `FuncContext::memory` now take a non-mut reference to self ([#41](https://github.com/explodingcamera/tinywasm/pull/41)).
55
55
- Untyped host functions now check return values correctly ([#27](https://github.com/explodingcamera/tinywasm/pull/27)) by [@WhaleKit](https://github.com/WhaleKit).
56
56
-`MemoryRefMut::copy_within(src, dst, len)` now follows its documented argument order.
57
57
- Imported tables created with `Extern::table(ty, init)` now honor the provided init value.
@@ -63,7 +63,7 @@ This release is a major runtime and API rework. It adds support for several newe
63
63
- Rename the cargo features `tinywasm-parser` to `parser` and `logging` to `log`.
64
64
- Rename `FuncHandle` to `Function` and `FuncHandleTyped` to `FunctionTyped`.
65
65
- Rename module export lookups from `exported_*` methods to `func`, `func_untyped`, and `memory`.
66
-
- Regenerate any persisted`twasm` archives; the format is now postcard-based and not backwards compatible with earlier releases.
66
+
- Regenerate any pre-existing`twasm` archives, the format is not backwards compatible with earlier releases.
Copy file name to clipboardExpand all lines: README.md
+1-4Lines changed: 1 addition & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,3 @@
1
-
> [!Important]
2
-
> The `next` branch contains a major rework of the runtime and API, which is still in development. The latest released version of tinywasm (0.8.0) is not recommended for use anymore, and the API will change significantly before the next release.
/// Resume execution with up to `fuel` units of fuel.
348
348
///
349
349
/// Fuel is accounted in chunks, so execution may overshoot the requested
350
-
/// fuel before returning [`ExecProgress::Suspended`].
350
+
/// fuel before returning [`ExecProgress::Suspended`] (currently the chunk size is 128 instructions between fuel checks, but this may change in the future).
351
351
///
352
352
/// Returns [`ExecProgress::Suspended`] when fuel is exhausted, or
353
353
/// [`ExecProgress::Completed`] with the final values once the invocation
0 commit comments