Added
-
Added
unchecked_optional_param_typeattribute for marking exported function parameters as optional in TypeScript (?:) and JSDoc ([paramName]) output. Mutually exclusive withunchecked_param_type. Required parameters after optional parameters are rejected at compile time. #5002 -
Added termination detection for
panic=unwindbuilds. When a non-JS exception (e.g. a Rust panic) escapes from Wasm, the instance is marked as terminated and subsequent calls from JS into Wasm will throw aModule terminatederror instead of re-entering corrupted state. #5005 -
When
--reset-stateis combined withpanic=unwindbuilds, the Wasm instance is automatically reset after a fatal termination, allowing subsequent calls to succeed instead of throwing aModule terminatederror. #5013
Changed
-
Replaced runtime
0x80000000vtable bit-flag for closure unwind safety with a compile-timeconst UNWIND_SAFE: boolgeneric on the invoke shim,OwnedClosure, andBorrowedClosure. RemovesOwnedClosureUnwindand deduplicates internal closure helpers. The public API is unchanged. #5003 -
Removed unused
IntoWasmClosureRef*::WithLifetimetypes,WasmClosure::to_wasm_slice, and a lifetime fromIntoWasmClosureRef*; movedStaticassociated type intoWasmClosure. #5003
Fixed
-
Fixed exported structs/enums/functions with the same
js_namebut differentjs_namespacevalues producing symbol collisions at compile time, by deriving internal wasm symbols from a qualified name that includes the namespace. #4977 -
Fixed soundness hole in
ScopedClosure'sUpcastFromthat allowed to extend the lifetime after the originalScopedClosurewas dropped. #5006