Repository navigation
[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::callandFunction::call_resumablenow write to caller-provided result slices. Untyped host callbacks also receive a result slice and returnResult<()>.- Creating a
HostFunctionno longer requires aStore. Definitions requireSend + Syncand can be reused across stores. - Module instantiation now borrows
Imports, allowing the same imports to be reused. HostFunction::tyandWasmFunction::tywere removed. UseFunction::ty(&Store)for runtime types.- Function and managed reference handles are tied to their originating
Store. Managed references keep their referents live, soWasmValueis no longerCopy. - Nullable typed references use
Option<T>, while bare typed references are non-null. WasmTupleChainwas removed. Use direct tuples up to arity 20 or untyped functions for larger signatures.ToWasmTypeswas renamed toWasmTypes, andToWasmTypewas renamed toWasmValueType.- Conversion traits now include
WasmTypes, andFromWasmValues::from_wasm_valuesrejects unconsumed values directly.
Memory, tables, and stores
- Pluggable memory backends and
Config::with_trap_on_oomwere removed for performance reasons. Linear memory is alwaysVec-backed. UseResourceLimiterto allow, reject, or trap memory allocation and growth requests. - The
Memory,Table,Global, andTagconstructors were renamed fromnewtotry_new. - Element types now use
RefType, and module definitions useTableDefinition { ty, init }. Table::grownow returnsResult<Option<usize>>, matchingMemory::grow.Store::idnow returnsu32, andModuleInstanceAddrwas renamed toModuleInstanceId.
Parser and archives
Parser::newnow takesParserOptions. UseParser::default()for default settings.Parser::with_optionswas removed.ParserOptions::optimize_rewritewas renamed toParserOptions::optimize.ParserOptions::parser_threadswas renamed toParserOptions::threads.- The
.twasmformat changed. Regenerate archives created by earlier TinyWasm versions.
Added
- Optional store-owned host state through
Store::with_state,Store::state, andStore::state_mut. - Support for the typed function references, garbage collection, exception handling, and compact import section proposals.
ResourceLimitercallbacks for memory and table allocation or growth.- A default-enabled
validateCargo feature and a parser option to skip WebAssembly validation. - Optional parse-time operand deduplication to reduce
.twasmarchive size. - Optional
sendsupport 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-callsbackend using Rust's unstable explicit tail calls for interpreter dispatch.
Changed
- Parsing now uses a single pass.
- Typed functions now support tuples up to arity 20 and
[u8; 16]values forv128. - 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.
- Memory64 bulk-memory operations and optimized stores now use the correct value-stack lanes.
memory.initnow performs correct bounds checks and operand lowering.- Memory64 now uses the correct default limits and host-size conversions, including on 32-bit targets.