Added
-
Added support for the
wasm64-unknown-unknowntarget (memory64 / wasm64).
usize/isizeand raw pointers are now lowered through anf64JS
number ABI on wasm64 (matching the existing convention used forOption<u32>
etc. on wasm32), with the CLI inspecting the module's memory type to pick
the right codegen path. Includes a dedicatedwasm64CI job and test
suite covering the new ABI paths.
#5004 -
Promise ergonomics:
Promise::all_tupleandPromise::all_settled_tuple
for heterogeneous concurrent awaits (arity 1..=8, destructure via
.into_tuple()), and a newwasm_bindgen::IntoJsGenerictrait underpinning
typed-Arrayinference (with codegen-emitted identity impls and a
#[wasm_bindgen(no_into_js_generic)]opt-out for types likeJsClosure).
Also re-exportsJsGenericfrom the prelude. Typed collection on
js_sys::Array<T>is exposed as the inherent constructor
Array::<T>::from_iter_typed(and companionextend_typed), inferringT
from the iterator item viaIntoJsGeneric. The stableFromIterator/
Extendimpls onArray(=Array<JsValue>) bound byAsRef<JsValue>
are preserved, so existing.collect::<Array>()call sites keep compiling
unchanged. Fixes #5042.
#5121,
#5125 -
Added
wasm_bindgen::instance()to return the current
WebAssembly.Instance. The generated JS glue retains the
instantiatedWebAssembly.Instance.
#5118 -
Added a
--cfg=wasm_bindgen_use_js_sysopt-in that makes async macro codegen
usejs_sys::futuresinstead ofwasm_bindgen_futures, dropping the need
forwasm-bindgen-futureswhen the crate already depends onjs-sys. A cfg
is used rather than a Cargo feature so the choice stays scoped to the crate
that opts in.
#5112
#5127
Changed
- Simplified generated
web-sysbindings by omitting redundant
#[wasm_bindgen]attributes when they match wasm-bindgen defaults, including
structural method annotations and matchingjs_nameentries. The
#[wasm_bindgen]attribute parser now also accepts string-literal forms for
extends,static_method_of, andvendor_prefix(alongside the existing
bare-path/ident syntax), and the generator emits these arguments along with
js_nameas string literals sorustfmtcan format the generated
#[wasm_bindgen(...)]attributes uniformly.
#5122
Fixed
-
Fixed namespaced export identifiers in generated JS/TS to use qualified names
consistently, resolving order-dependent codegen issues across platforms. Also
fixedVec<T>types in TS signatures to resolve through the identifier map.
#5106 -
Fixed
wasm-bindgen-test-runnertreating ChromeDriver stderr warnings as
startup failures on macOS, causing a restart loop until timeout. The runner
no longer uses stderr output to determine if a driver has failed; instead a
per-attempt timeout detects stuck drivers and retries on a new port.
#5111