Update rust-wasm-bindgen monorepo to v0.2.121#85
Merged
Conversation
leighmcculloch
approved these changes
Jun 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.2.92→0.2.1210.2.122Release Notes
wasm-bindgen/wasm-bindgen (wasm-bindgen-cli)
v0.2.121Compare Source
Added
Added the
slice_to_arrayattribute for imported JS functions,which makes a
&[T](orOption<&[T]>) argument arrive on the JSside as a plain
Arrayrather than a typed array — withoutchanging the Rust-side
&[T]signature. Useful when binding JSAPIs that take
T[]rather thanTypedArray<T>. For primitiveelement kinds the wire is the same zero-copy borrow used by plain
&[T], with the JS-side shim wrapping the view inArray.from(...)to materialise the
Array— no extra allocation. ForString,JsValue, and JS-imported element types the Rust side builds afresh
[u32]index buffer that JS reads and frees, with per-element&T -> JsValue(refcount bump for handle-shaped types). NoT: Clonebound is required. The attribute can be set per-fn(
#[wasm_bindgen(slice_to_array)] fn ...) or per-block on anextern "C" { ... }declaration to apply to every imported functionin that block.
&[ExportedRustStruct]remains unsupported (useowned
Vec<T>for that). Has no effect on exported functions;default
&[T](typed-array view / memory borrow) and ownedVec<T>semantics are unchanged for callers that didn't opt in.See the
slice_to_arrayguide page.#5145
Added
js_sys::AggregateErrorbindings (constructor,errorsgetter, andnew_with_message/new_with_optionsoverloads).AggregateErrorrepresentsmultiple unrelated errors wrapped in a single error, e.g. as thrown by
Promise.anywhen all input promises reject, along withjs_sys::ErrorOptions,accepted by built-in error constructors.
ErrorOptions::new(cause)constructs an instance pre-populated with
cause, andget_cause/set_causeprovide typed access to the property. All standard errorconstructors that previously took only a
message(EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,WebAssembly.CompileError,WebAssembly.LinkError,WebAssembly.RuntimeError) now expose anew_with_options(message, &ErrorOptions)overload, andErrorgainsnew_with_error_options(message, &ErrorOptions)alongside the existinguntyped
new_with_options.AggregateError::new_with_optionsalso takes&ErrorOptions.#5139
Added inheritance for Rust-exported types: an exported struct may
declare
#[wasm_bindgen(extends = Parent)]to inherit from anotherexported
#[wasm_bindgen]struct. The macro injects a hiddenparent: wasm_bindgen::Parent<Parent>field (a refcounted cell aroundthe parent value) and emits
class Child extends Parentin thegenerated JS /
.d.ts. The child gets anAsRef<Parent<Parent>>implfor the direct parent, and threads per-class pointer slots through
the wasm ABI so that
instanceof Parentis true and parent methodsdispatch soundly via the JS prototype chain. From inside child
methods, parent data is reached via
self.parent.borrow()/self.parent.borrow_mut(). See the newextendsguide page.#5120
Added
js_sys::FinalizationRegistrybindings (constructor,register,register_with_token, andunregister). The cleanup callback parameteris typed as
&Function<fn(JsValue) -> Undefined>, so closures created viaClosure::newcan be passed usingFunction::from_closure(for ownedclosures retained by JS) or
Function::closure_ref(for borrowed scopedclosures). Pairs with the existing
js_sys::WeakRefbindings.#5140
Added support for well-known symbols in
js_name,getter, andsettervia the explicit bracket-string form"[Symbol.<name>]". This works for imported and exported methods,fields, getters, and setters. For example,
#[wasm_bindgen(js_name = "[Symbol.iterator]")]on an exported methodgenerates
[Symbol.iterator]() { ... }on the generated JS class, andthe same syntax works for
getter/setterand for imported items.#4230
Added level 2 bindings for
ViewTransitiontoweb-sys.#5138
Add support for dynamic unions: a
#[wasm_bindgen]enum that mixes string-literalvariants with single-field tuple variants is now exported as an untagged TypeScript
union and dispatched dynamically at the JS↔Rust boundary. The new enum-level
#[wasm_bindgen(fallback)]attribute makes the last tuple variant anunconditional catch-all, supporting unions whose trailing variant has no
runtime check (e.g., interface-only imports). String enums and dynamic
unions now emit
export type(was baretype) so the alias is a namedexport, and both honour the
privateflag to suppress the keyword.#4734
#2153
#2088
Fixed
From<Promise<T>> for JsFuture<T>andIntoFuture for Promise<T>nowaccept any
T: FromWasmAbi(rather thanT: JsGeneric), lettingimported
async fns return dynamic-union enums.TryFromJsValuefor C-style enums no longer accepts non-numeric valuesvia JS unary
+coercion. Previously callingdyn_into::<MyEnum>()ona string would silently coerce it via
+"foo"(yieldingNaN, thenNaN as u32 = 0) and could match a discriminant by accident; theconversion now returns
Nonefor any value that is not a JS number.#4734
Fix compilation failure with
no_std+release#5134
Raw identifiers (
r#name) on enums, enum variants, extern types, statics,and
implblocks no longer leak ther#prefix into generated JS / TSoutput and shim names. The Rust-side identifier and the JS-side name are
now tracked separately for enum variants, and all known identifier
fallback paths apply
Ident::unraw()so e.g.pub enum r#Enum { r#A }generatesEnum.Ainstead of producingsyntactically invalid JS.
#4323
Using the
-C panic=unwindoption when building for the bundler targetwould produce invalid JS.
#5142
Changed
js_sys::DataViewnow implements thejs_sys::TypedArraytrait. AFIXMEnotes that the trait should be renamed toArrayBufferViewinthe next major release to better reflect the WebIDL spec name covering
both
DataViewand the typed-array types.#5135
v0.2.120Compare Source
Added
Added support for the
wasm64-unknown-unknowntarget (memory64 / wasm64).usize/isizeand raw pointers are now lowered through anf64JSnumber ABI on wasm64 (matching the existing convention used for
Option<u32>etc. on wasm32), with the CLI inspecting the module's memory type to pick
the right codegen path. Includes a dedicated
wasm64CI job and testsuite covering the new ABI paths.
#5004
Promise ergonomics:
Promise::all_tupleandPromise::all_settled_tuplefor heterogeneous concurrent awaits (arity 1..=8, destructure via
.into_tuple()), and a newwasm_bindgen::IntoJsGenerictrait underpinningtyped-
Arrayinference (with codegen-emitted identity impls and a#[wasm_bindgen(no_into_js_generic)]opt-out for types likeJsClosure).Also re-exports
JsGenericfrom the prelude. Typed collection onjs_sys::Array<T>is exposed as the inherent constructorArray::<T>::from_iter_typed(and companionextend_typed), inferringTfrom the iterator item via
IntoJsGeneric. The stableFromIterator/Extendimpls onArray(=Array<JsValue>) bound byAsRef<JsValue>are preserved, so existing
.collect::<Array>()call sites keep compilingunchanged. Fixes #5042.
#5121,
#5125
Added
wasm_bindgen::instance()to return the currentWebAssembly.Instance. The generated JS glue retains theinstantiated
WebAssembly.Instance.#5118
Added a
--cfg=wasm_bindgen_use_js_sysopt-in that makes async macro codegenuse
js_sys::futuresinstead ofwasm_bindgen_futures, dropping the needfor
wasm-bindgen-futureswhen the crate already depends onjs-sys. A cfgis used rather than a Cargo feature so the choice stays scoped to the crate
that opts in.
#5112
#5127
Changed
web-sysbindings by omitting redundant#[wasm_bindgen]attributes when they match wasm-bindgen defaults, includingstructural method annotations and matching
js_nameentries. The#[wasm_bindgen]attribute parser now also accepts string-literal forms forextends,static_method_of, andvendor_prefix(alongside the existingbare-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
fixed
Vec<T>types in TS signatures to resolve through the identifier map.#5106
Fixed
wasm-bindgen-test-runnertreating ChromeDriver stderr warnings asstartup 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
v0.2.118Compare Source
Added
Added
Error::stack_trace_limit()andError::set_stack_trace_limit()bindingsto
js-sysfor the non-standard V8Error.stackTraceLimitproperty.#5082
Added support for multiple
#[wasm_bindgen(start)]functions, which arechained together at initialization, as well as a new
#[wasm_bindgen(start, private)]to register a start function withoutexporting it as a public export.
#5081
Reinitialization is no longer automatically applied when using
panic=unwindand
--experimental-reset-state-function, instead it is triggered by anyuse of the
handler::schedule_reinit()function underpanic=unwind,which is supported from within the
on_aborthandler for reinit workflows.Renamed
handler::reinit()tohandler::schedule_reinit()and removedthe
set_on_reinit()handler. The__instance_terminatedaddressis now always a simple boolean (
0= live,1= terminated).#5083
handler::schedule_reinit()now works underpanic=abortbuilds. Previouslyit was a no-op; it now sets the JS-side reinit flag and the next export call
transparently creates a fresh
WebAssembly.Instance.#5099
Changed
#5102
Fixed
ES module
importstatements are now hoisted to the top of generated JSfiles, placed right after the
@ts-self-typesdirective. This ensuresvalid ES module output since
importdeclarations must precede otherstatements.
#5103
Fixed two CLI issues affecting WASM modules built by rustc 1.94+. First,
a panic (
failed to find N in function table) caused by lld emitting elementsegment offsets as
global.get $__table_baseor extended const expressionsinstead of plain
i32.const Nfor large function tables; the fix adds aconst-expression evaluator in
get_function_table_entryand guards againstinteger underflow in multi-segment tables. Second, the descriptor interpreter
now routes all global reads/writes through a single
globalsHashMap seededfrom the module's own globals, and mirrors the module's actual linear memory
rather than a fixed 32KB buffer, so the stack pointer's real value is valid
without any override. This fixes panics like
failed to find 32752 in function tablecaused byGOT.func.internal.*globals being misidentified as thestack pointer.
#5076
#5080
#5093
#5095
v0.2.117Compare Source
Fixed
Fixed a regression introduced in #5026 where stable
web-sysmethods thataccept a union type containing a
[WbgGeneric]interface (e.g.ImageBitmapSource, which includesVideoFrame) incorrectly applied typedgenerics to all union expansions rather than only those whose argument type
is itself
[WbgGeneric]. In practice this causedWindow::create_image_bitmap_with_*and the corresponding
WorkerGlobalScopeoverloads to returnPromise<ImageBitmap>instead ofPromise<JsValue>for the stable(non-
VideoFrame) call sites, breakingJsFuture::from(promise).await?.#5064
#5073
Fixed handling logic for environment variable
WASM_BINDGEN_TEST_ADDRESSinthe test runner, when running tests in headless mode.
#5087
v0.2.116Compare Source
Added
js_sys::Float16Arraybindings,DataViewfloat16 accessors usingf32, and raw[u16]helper APIs for interoperability with binary16representations such as
half::f16.#5033
Changed
Updated to Walrus 0.26.1 for deterministic type section ordering.
#5069
The
#[wasm_bindgen]macro now emits&mut (impl FnMut(...) + MaybeUnwindSafe)/
&(impl Fn(...) + MaybeUnwindSafe)for raw&mut dyn FnMut/&dyn Fnimport arguments instead of a hidden generic parameter and where-clause. The
generated signature is cleaner and the
MaybeUnwindSafebound is visibledirectly in the argument position. The ABI and wire format are unchanged.
When building with
panic=unwind, closures that capture non-UnwindSafevalues (e.g.
&mut T,Cell<T>) must wrap them inAssertUnwindSafebeforecapture; on all other targets
MaybeUnwindSafeis a no-op blanket impl.#5056
v0.2.115Compare Source
Added
console.debug/log/info/warn/erroroutput from user-spawnedWorkerandSharedWorkerinstances is now forwarded to the CLI test runner duringheadless browser tests, just like output from the main thread. Works for
blob URL workers, module workers, URL-based workers (importScripts), nested
workers, and shared workers (including logs emitted before the first port
connection). Non-cloneable arguments are serialized via
String()ratherthan crashing the worker. The
--nocaptureflag is respected.#5037
js_sys::Promise<T>now implementsIntoFuture, enabling direct.awaitonany JS promise without a wrapper type. The
wasm-bindgen-futuresimplementationhas been moved into
js-sysbehind an optionalfuturesfeature, which isactivated automatically when
wasm-bindgen-futuresis a dependency. Allexisting
wasm_bindgen_futures::*import paths continue to work unchanged viare-exports.
js_sys::futuresis also available directly for users who wantpromise.awaitwithout depending onwasm-bindgen-futures.#5049
Added
--target emscriptensupport, generating alibrary_bindgen.jsfilefor consumption by Emscripten at link time. Includes support for futures,
JS closures, and TypeScript output. A new Emscripten-specific test runner is
also included, along with CI integration.
#4443
Added
VideoFrame,VideoColorSpace, and related WebCodecs dictionaries/enums toweb-sys.#5008
Added
wasm_bindgen::handlermodule withset_on_abortandset_on_reinithooks for
panic=unwindbuilds.set_on_abortregisters a callback invokedafter the instance is terminated (hard abort, OOM, stack overflow).
set_on_reinitregisters a callback invoked afterreinit()resets theWebAssembly instance via
--experimental-reset-state-function. Handlers arestored as Wasm indirect-function-table indices so dispatch is safe even when
linear memory is corrupt.
Changed
Replaced per-closure generic destructors with a single
__wbindgen_destroy_closureexport.
#5019
Refactored the headless browser test runner logging pipeline for dramatically improved
performance (>400x faster on Chrome, >10x on Firefox, ~5x on Safari). Switched to
incremental DOM scraping with
textContent.slice(offset), append-only output semantics,unified log capture across all log levels on failure, and browser-specific invisible-div
optimizations (
display:nonefor Chrome/Firefox,visibility:hiddenfor Safari).#4960
TTY-gated status/clear output in the test runner shell to avoid
\rcontrol-characterartifacts in non-interactive (CI) environments.
#4960
Added
bench_console_log_10mbbenchmark alongside the existing 1MB benchmark for theheadless test runner. The main branch cannot complete this benchmark at any volume.
#4960
Updated to Walrus 0.26
#5057
Fixed
Fixed argument order when calling multi-parameter functions in the
wasm-bindgeninterpreter by reversing the args collected from the stack.#5047
Added support for per-operation
[WbgGeneric]in WebIDL, restoring typedgeneric return types (e.g.
Promise<ImageBitmap>) forcreateImageBitmaponWindowandWorkerGlobalScopethat were lost after theVideoFramestabilization.
#5026
Fixed missing
#[cfg(feature = "...")]gates on deprecated dictionary buildermethods and getters for union-typed fields (e.g.
{Open,Save,Directory}FilePickerOptions::start_in()),and fixed per-setter doc requirements to list each setter's own required features.
#5039
Fixed
JsOption::new()to useundefinedinstead ofnull, to be compatible withOption::Noneand JS default parameters.#5023
Fixed unsound
unsafetransmutes inJsOption<T>::wrap,as_option, andinto_optionby replacing
transmute_copywithunchecked_into(). Also tightened theJsGenerictrait bound and
JsOption<T>impl block to requireT: JsGeneric(which impliesJsCast),preventing use with arbitrary non-JS types.
#5030
Fixed headless test runner emitting
\rcarriage-return sequences in non-TTY environments,which polluted captured logs in CI and complicated output-matching tests.
#4960
Fixed headless test runner printing incomplete and out-of-order log output on test failures
by merging all five log levels into a single unified output div.
#4960
Fixed large test outputs (10MB+) causing oversized WebDriver responses that were either
extremely slow or crashed completely, by switching to incremental streaming output collection.
#4960
Fixed a duplciate wasm export in node ESM atomics, when compiled in debug mode
#5028
Fixed a type inference regression (
E0283: type annotations needed) introducedin v0.2.109 where the stable
FromIteratorandExtendimpls onjs_sys::Arraywere changed from
A: AsRef<JsValue>toA: AsRef<T>. Because#[wasm_bindgen]generates multiple
AsRefimpls per type, the compiler could not uniquely resolveT, breaking code likeArray::from_iter([my_wasm_value])without explicitannotations. The stable impls are restored to
A: AsRef<JsValue>(returningArray<JsValue>); the genericA: AsRef<T>forms remain available underjs_sys_unstable_apis.#5052
Fixed
skip_typescriptnot being respected when usingreexport, causingTypeScript definitions to be incorrectly emitted for re-exported items marked
with
#[wasm_bindgen(skip_typescript)].#5051
Removed
v0.2.114Compare Source
Added
Added
[WbgGeneric]WebIDL extended attribute for opting stable dictionary and interfacedefinitions into typed generics (the same signatures unstable APIs use), avoiding legacy
&JsValuefallbacks. Applied to all new VideoFrame-related types.#5008
Added
unchecked_optional_param_typeattribute for marking exported function parameters asoptional 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 Rustpanic) escapes from Wasm, the instance is marked as terminated and subsequent calls from JS
into Wasm will throw a
Module terminatederror instead of re-entering corrupted state.#5005
When
--reset-stateis combined withpanic=unwindbuilds, the Wasm instance isautomatically reset after a fatal termination, allowing subsequent calls to succeed
instead of throwing a
Module terminatederror.#5013
Changed
Replaced runtime
0x80000000vtable bit-flag for closure unwind safety with acompile-time
const UNWIND_SAFE: boolgeneric on the invoke shim,OwnedClosure,and
BorrowedClosure. RemovesOwnedClosureUnwindand deduplicates internalclosure 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 derivinginternal 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
v0.2.113Compare Source
Changed
Reduced usage of
unsafecode: replacedtransmute/transmute_copywith safealternatives for
Boolean/Null/Undefinedconstants andArrayTupleconversions,unified duplicated
AsRef/Fromimpls for generic imported types, and removed the__wbindgen_object_is_undefinedintrinsic in favor of a safe Rust-side equivalent.#4993
Renamed
__wbindgen_object_is_null_or_undefinedintrinsic to__wbindgen_is_null_or_undefinedand removed the__wbindgen_object_is_undefinedintrinsic, replacing it with a safe Rust-side check. The
is_null_or_undefinedchecknow uses safe
&JsValueABI instead of rawu32.#4994
Fixed
types (e.g.
texImage2Dtaking aVideoFrameparameter). These methods werebeing named in a separate unstable expansion namespace, producing overly-short
names like
tex_image_2dinstead of the correcttex_image_2d_with_u32_and_u32_and_video_frame. The fix separates the signatureclassification to distinguish "from unstable IDL" (authoritative overrides) from
"stable method using an unstable type", ensuring the latter is named as part of
the stable expansion.
#4991
v0.2.112Compare Source
Removed
ImmediateClosuretype introduced in 0.2.109. Stack-borrowed&dyn Fn/&mut dyn FnMutclosures are now treated as unwind safe by default (panics are caught and converted to JS exceptions
with proper unwinding). A unified
ScopedClosure::immediateapproach may be revisited in a futurerelease.
#4986
v0.2.111Compare Source
Fixed
re-added deprecated
Promise::then2binding, revertedPromise::all_settledstable signature to take
&JsValueinstead of ownedObject, and addeddefault type parameters (
= JsValue) toArrayIntoIter,ArrayIter, andIterstructs.#4979
v0.2.110Compare Source
Changed
Closure::foo(),Closure::foo_aborting()andClosure::foo_assert_unwind_safe()this then fully allows switching from the UnwindSafe bound now being applies on foo() to use one of thealternatives, given these limitations of AssertUnwindSafe. The same applies to
ImmediateClosure. In addition, mutable reentrancy guards areadded for
ImmediateClosure, and it is updated to be pass-by-value as well.#4975
Fixed
Array<T>broke inference.Reverted to use non-generic JsValue arguments. In addition extends generic class hoisting to
for constructors to also include
static_method_ofmethods returning the own type, to allowArray::ofgeneric to now be on theArray<T>impl block.#4974
v0.2.109Compare Source
Added
Added support for erasable generic type parameters on imported JavaScript types,
using sound type erasure in JS bindgen boundary. Includes updated js-sys bindings
with generic implementations for many standard JS types and functions including
Array<T>,Promise<T>,Map<K, V>,Iterator<T>, and more.#4876
Added
ScopedClosure<'a, T>as a unified closure type with lifetime parameter.ScopedClosure::borrow(&f)(for immutableFn) andScopedClosure::borrow_mut(&mut f)(for mutableFnMut) create borrowed closures that can capture non-'staticreferences, ideal for immediate/synchronous JS callbacks.Closure<T>is now a type alias forScopedClosure<'static, T>, maintaining backwards compatibility. Also addedIntoWasmAbiimplementation forClosure<T>enabling pass-by-value ownership transfer to JavaScript.Added
ImmediateClosure<'a, T>as a lightweight, unwind-safe replacement for&dyn FnMutin immediate/synchronous callbacks. UnlikeScopedClosure, it hasno JS call on creation, no JS call on drop, and no GC overhead—the same ABI as
&dyn FnMutbut with panic safety. UseImmediateClosure::new(&f)forimmutable
Fnclosures (easier to satisfy unwind safety) orImmediateClosure::new_mut(&mut f)formutable
FnMutclosures. Closure parameter types are automatically inferred from context.Also implements
From<&ImmediateClosure<T>> for ScopedClosure<T>for API migration.#4950
Implement
#[wasm_bindgen(catch)]exception handling directly in Wasm usingWebAssembly.JSTagwhen Wasm exception handling is available. This generatessmaller and faster code by avoiding JavaScript
handleErrorwrapper functions.#4942
Add Node.js
worker_threadssupport for atomics builds. When targeting Node.js with atomics enabled, wasm-bindgen now generatesinitSync({ module, memory, thread_stack_size })and__wbg_get_imports(memory)functions that allow worker threads to initialize with a shared WebAssembly.Memory and pre-compiled module. Auto-initialization occurs only on the main thread for backwards compatibility.Added a panic message when a getter has more than one argument.
#4936
Added support for WebIDL namespace attributes in
wasm-bindgen-webidl. This enablesAPIs like the CSS Custom Highlight API which adds the
highlightsattribute to theCSSnamespace.#4930
Added stable
ShowPopoverOptionsdictionary andshow_popover_with_options()method toHtmlElement, and unstableTogglePopoverOptionsdictionary per the WHATWG HTML spec.#4968
Added unstable Geolocation API types per the latest W3C spec:
GeolocationCoordinates,GeolocationPosition, andGeolocationPositionError. TheGeolocationinterface nowhas both stable methods (using the old
Position/PositionErrortypes with[Throws])and unstable methods (using the new types without
[Throws]}, matching actual browser behavior).#2578
Added
matrixTransform()method toDOMPointReadOnlyinweb-sys.#4962
Added the
webandnodetargets to the--experimental-reset-state-functionflag.#4909
Added
oncancelevent handler toGlobalEventHandlers(available onHtmlElement,Document,Window, etc.).#4542
Added
CommandEventandCommandEventInitfrom the Invoker Commands API.#4552
Added
AbstractRange,StaticRange, andStaticRangeInitinterfaces.#4221
Updated WebCodecs API to Working Draft 2026-01-29 and MediaRecorder API to 2025-04-17.
Added
rotationandfliptoVideoDecoderConfig.#4411
Added support for unstable WebIDL to override stable attribute types, allowing
corrected type signatures behind
web_sys_unstable_apis. Applied toMouseEventcoordinate attributes (
clientX,clientY,screenX,screenY,offsetX,offsetY,pageX,pageY) which now returnf64instead ofi32whenunstable APIs are enabled, per the CSSOM View spec draft.
#4935
Added support for unstable WebIDL to override stable method return types. This
enables User Timing Level 3 APIs where
Performance.mark()andPerformance.measure()return
PerformanceMarkandPerformanceMeasurerespectively (instead ofundefined)when
web_sys_unstable_apisis enabled. Also addedPerformanceMarkOptions,PerformanceMeasureOptions, and thedetailattribute on marks/measures.#3734
Added non-standard
modeoption forFileSystemFileHandle.createSyncAccessHandle().Also improved WebIDL generator to track stability at the signature level, allowing
stable methods to have unstable overloads.
#4928
Updated WebGPU bindings to the February 2026 spec. Dictionary fields with union
types now generate multiple type-safe setters (e.g.
set_resource_gpu_sampler(),set_resource_gpu_texture_view()) alongside a deprecated fallback setter. Sequencearguments in unstable APIs now use typed slices (
&[T]) instead of&JsValue.Fixed inner string enum types to use
JsStringin generic positions, addedBigIntto builtin identifiers, and fixed dictionary field feature gates to not over-constrain
getters with setter type requirements.
#4955
Improved dictionary union type expansion: stable fallback setters are no longer
deprecated, and unstable builder methods now use the first typed variant instead
of
&JsValue. Dictionaries with required union fields now generate expandedconstructors for each variant (e.g.
new(),new_with_gpu_texture_view()),with duplicate-signature variants elided.
#4966
Changed
Increased externref stack size from 128 to 1024 slots to prevent "table index is out of bounds"
errors in applications with deep call stacks or many concurrent async operations.
#4951
Closure::new(),Closure::once(), and related methods now requireUnwindSafebounds on closures when building withpanic=unwind. New_abortingvariants (new_aborting(),once_aborting(), etc.) are provided for closures that don't need panic catching and want to avoid theUnwindSaferequirement.#4893
globaldoes not use the unsafe-evalnew Functiontrick anymore allowing to have CSP strict compliant packages withwasm-bindgen.#4910
evalandFunctionconstructors are now gated behind theunsafe-evalfeature.#4914
Fixed
Fixed incorrect JS export names when LLVM merges identical functions at
opt-level >= 2.#4946
Fixed incorrect
Closureadapter deduplication when wasm-ld's Identical Code Folding mergesinvoke functions for different closure types into the same export.
#4953
Fixed
ReferenceErrorwhen using Rust struct names that conflict with JS builtins (e.g.,Array).The constructor now correctly uses the aliased
FinalizationRegistryidentifier.#4932
Fixed
Element::scroll_top(),Element::scroll_left(), andHtmlElement::scroll_top()to return
f64instead ofi32per the CSSOM View spec, behindweb_sys_unstable_apis.The stable API is unchanged for backwards compatibility.
#4525
Added spec-compliant
i32parameter types forCanvasRenderingContext2d::get_image_data()and
put_image_data()(andOffscreenCanvasRenderingContext2dequivalents) behindweb_sys_unstable_apis. Per the HTML spec,getImageDataandputImageDatauselong(i32) for coordinates, not
double(f64). The stable API is unchanged for backwardscompatibility.
#1920
Fixed incorrect
#[cfg(web_sys_unstable_apis)]gating on stable method signatures thatshare a WebIDL operation with unstable overloads. For example,
Clipboard.read()(0 args)was incorrectly gated as unstable because the unstable
read(options)overload existed.The WebIDL code generator now uses an authoritative expansion model where stable and unstable
signature sets are built independently and compared: identical signatures merge (no gate),
stable-only signatures get
not(unstable), and unstable-only signatures getunstable.Also adds typed generics (
Promise<T>,Array<T>,Function<fn(...)>, etc.) to allunstable API methods, and adds missing
PhotoCapabilities,PhotoSettings,MediaSettingsRange,Point2D,RedEyeReduction,FillLightMode, andMeteringModetypes from the W3C Image Capture spec.
#4964
Fixed
unfulfilled_lint_expectationswarnings when using#[expect(...)]attributeson functions annotated with
#[wasm_bindgen]. The#[expect]attributes are nowconverted to
#[allow]in generated code to prevent spurious warnings.#4409
v0.2.108Compare Source
Fixed
panic=unwindbuilds for non-Wasm targets would triggerUnwindSafeassertions.#4903
v0.2.107Compare Source
Added
Support catching panics, and raising JS Exceptions for them, when building
with panic=unwind on nightly, with the
stdfeature.#4790
Added support for passing
&[JsValue]slices from Rust to JavaScript functions.#4872
Added
privateattribute on exported types to allow generatingexports and structs as implicit internal exported types for function
arguments and returns, without exporting them on the public interface.
#4788
Added
iter_customanditer_custom_futurefor bench to do custom measurements.#4841
Added Window Management API.
#4843
Changed
Changed WASM import namespace from
wbgto./{name}_bg.jsforwebandno-modulestargets,aligning with
bundlerandexperimental-nodejs-moduleto enable cross-target WASM sharing.#4850
Replace
WASM_BINDGEN_UNSTABLE_TEST_PROFRAW_OUTandWASM_BINDGEN_UNSTABLE_TEST_PROFRAW_PREFIXwith parsingLLVM_PROFILE_FILEanalogous to Rust test coverage.#4367
Typescript custom sections sorted alphabetically across codegen-units.
#4738
Optimized demangling performance by removing redundant string formatting
#4867
Changed WASM import namespace from
__wbindgen_placeholder__to./{name}_bg.jsfornodetargets, aligning withbundlerandexperimental-nodejs-moduleto enable cross-target WASM sharing.#4869
Changed WASM import namespace from
__wbindgen_placeholder__to./{name}_bg.jsfordenoandmoduletargets, aligning withnode,bundlerandexperimental-nodejs-moduleto enable cross-target WASM sharing.#4871
Consolidate JavaScript glue generation
Move target-specific JS emission into a single finalize phase, reducing
branching and making the generated output more consistent across targets.
--target experimental-nodejs-moduleemit one JS entrypoint (no separate_bg.js)./* @​ts-self-types="./<name>.d.ts" */to JS entrypoints for JSR/Deno resolution.#4879
Forward worker errors to test output in the test runner.
#4855
Fixed
Fix: Include doc comments in TypeScript definitions for classes
#4858
Interpreter: support try_table blocks
#4862
Interpreter: Stop interpretting descriptor after
__wbindgen_describe_cast#4862
v0.2.106Compare Source
Added
New MSRV policy, and bump of the MSRV fo 1.71.
#4801
Added
CSS Custom HighlightAPI toweb-sys.#4792
Added typed
thissupport in the first argument in free function exports viaa new
#[wasm_bindgen(this)]attribute.#4757
Added
reexportattribute for imports to support re-exporting imported types,with optional renaming.
#4759
Added
js_namespaceattribute on exported types, mirroring the importsemantics to enable arbitrarily nested exported interface objects.
#4744
Added 'container' attribute to
ScrollIntoViewOptions#4806
Updated and refactored output generation to use alphabetical ordering
of declarations.
#4813
Added benchmark support to
wasm-bindgen-test.#4812
#4823
Fixed
Fixed node test harness getting stuck after tests completed.
#4776
Quote names containing colons in generated .d.ts.
#4488
Fixes TryFromJsValue for structs JsValue stack corruption on failure.
#4786
Fixed
wasm-bindgen-test-runneroutputting empty line when using the--listoption. In particular,cargo-nextestnow works correctly.#4803
It now works to build with
-Cpanic=unwind.#4796
#4783
#4782
Fixed duplicate symbols caused by enabling v0 mangling.
#4822
Fixed a multithreaded wasm32+atomics race where
Atomics.waitAsyncpromise callbacks could callrunwithout waking first, causing sporadic panics.#4821
Removed
v0.2.105Compare Source
Added
Added
Math::PIbinding tojs_sys, exposing the ECMAScriptMath.PIconstant.#4748
Added ability to use
--keep-lld-exportsinwasm-bindgen-test-runnerby setting theWASM_BINDGEN_KEEP_LLD_EXPORTSenvironment variable.#4736
Added
CookieStoreAPI.#4706
Added
run_cli_with_argslibrary functions to allwasm_bindgen_clientrypoints.#4710
Added
get_rawandset_rawforWebAssembly.Table.#4701
Added
new_with_valueandgrow_with_valueforWebAssembly.Table.#4698
Added better support for async stack traces when building in debug mode.
#4711
Extended support for
TryFromJsValuetrait implementations.#4714
New
JsValue.is_null_or_undefined()method and intrinsic.#4751
Support for
Option<JsValue>in function arguments and return.#4752
Support for
WASM_BINDGEN_KEEP_TEST_BUILD=1environment variableto retain build files when using the test runner.
#4758
Fixed
Fixed multithreading JS output for targets
bundler,denoandmodule.#4685
Fixed
TextDe/Encoderdetection for audio worklet use-cases.#4703
Fixed post-processing failures in case Std has debug assertions enabled.
#4705
Fixed JS memory leak in
wasm_bindgen::Closure.#4709
Fixed warning when using
#[wasm_bindgen(wasm_bindgen=xxx)]on struct.#4715
Removed
wasm-bindgen-backendwill no longer be published.#4696
v0.2.104Compare Source
Added
Added bindings for
WeakRef.#4659
Support
Symbol.disposemethods by default, when it is supported in the environment.#4666
Added
aarch64-unknown-linux-muslrelease artifacts.#4668
Changed
Unconditionally use the global
TextEncoder/TextDecoderfor string encoding/decoding. The Node.js output now requires a minimum of Node.js v11.#4670
Deprecate the
msrvcrate feature. MSRV detection is now always on.#4675
Fixed
Fixed wasm-bindgen-cli's
encode_intoargument not working.#4663
Fixed a bug in
--experimental-reset-state-functionsupport for heap reset.#4665
Fixed compilation failures on Rust v1.82 and v1.83.
#4675
v0.2.103Compare Source
Fixed
#4656
v0.2.102Compare Source
Added
Added
DocumentOrShadowRoot.adoptedStyleSheets.#4625
Added support for arguments with spaces using shell-style quoting in webdriver
*_ARGSenvironment variables to
wasm-bindgen-test.#4433
Added ability to determine WebDriver JSON config location via
WASM_BINDGEN_TEST_WEBDRIVER_JSONenvironment variable towasm-bindgen-test.#4434
Generate DWARF for tests by default. See the guide on debug information for more details.
#4635
New
--target=moduletarget for outputting source phase imports.#4638
Changed
wasm-bindgen --helpdocs.#4646
Fixed
Fixed wrong method names for
GestureEventbindings.#4615
Fix crash caused by allocations during
TypedArrayinteractions.#4622
v0.2.101Compare Source
Added
Added format and colorSpace support to VideoFrameCopyToOptions
#4543
Added support for the [
onbeforeinput](https://developer.mozilla.org/en-US/docs/WConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.