Skip to content

Update rust-wasm-bindgen monorepo - #21

Open
ki7dk wants to merge 1 commit into
mainfrom
renovate/rust-wasm-bindgen-monorepo
Open

ki7dk wants to merge 1 commit into
mainfrom
renovate/rust-wasm-bindgen-monorepo

Conversation

@ki7dk

@ki7dk ki7dk commented Sep 5, 2026

Copy link
Copy Markdown
Member

This PR contains the following updates:

Package Type Update Change
js-sys (source) dependencies patch 0.3.1040.3.105
wasm-bindgen (source) dependencies patch 0.2.1270.2.128
wasm-bindgen-futures (source) dependencies patch 0.4.770.4.78

Release Notes

wasm-bindgen/wasm-bindgen (wasm-bindgen)

v0.2.128

Compare Source

Added
  • Added OffscreenCanvas overloads for the WebGL texImage2D, texSubImage2D,
    texImage3D and texSubImage3D functions, matching the TexImageSource
    typedef in the WebGL specification.
    #​5312

  • Added --split-debug-info to the CLI. This option extracts the DWARF debug
    info to a separate *_bg.debug.wasm file. Use --debug-info-url to set
    the recorded URL for the debug info. #​5279

  • Added #[wasm_bindgen(experimental_generic_mono)] for imported functions,
    which binds a generic import once per monomorphisation instead of erasing
    its type parameters to JsValue. It can be applied to an individual import
    or to a whole extern "C" block, which every generic function in the block
    then inherits. Each instantiation gets its own descriptor, so arguments and
    return values are marshalled at their concrete types (a u32 crosses as a
    number, a String as a string) rather than being boxed. Trait bounds,
    where predicates (including higher-ranked ones), associated-type
    projections, lifetime parameters, argument-position impl Trait, raw
    callbacks with owned generic inputs and returns, async, catch, and
    slice_to_array are all supported; see
    the guide
    for the supported surface and the shapes that are rejected. The attribute
    is experimental and may change as it stabilizes.
    #​5230
    #​5272
    #​5314

  • Added the experimental, sealed JsStringLike marker trait — implemented for
    String/&str (and js_sys::JsString/&js_sys::JsString in js-sys) —
    as a bound for experimental_generic_mono imports that accept any string
    shape at its native wire format.

  • #[wasm_bindgen(experimental_generic_mono)] now supports class-level generic
    parameters: an imported type that is itself generic (type Holder<T>),
    used as a method receiver (this: &Holder<T>), or as the return type of a
    constructor or self-returning static method (fn new<T>(value: T) -> Holder<T>). See Class-level generics
    in the guide.
    #​5290

  • A generic imported type used as a method receiver or a constructor's return
    type may now carry concrete generic arguments (this: &Holder<u32>,
    this: &Holder<u32, T>). The arguments are re-emitted as written, so the
    generated method hangs off impl Holder<u32> rather than the class's own
    parameter defaults.
    #​5290

  • Added experimental JSPI (JS Promise Integration) support: using it emits a
    compiler warning noting the experimental status.
    Supports #[wasm_bindgen(jspi)] on exports (sync or async), within which
    a #[wasm_bindgen(suspending)] import call can suspend to the JS event
    loop until its Promise settles. js_sys::futures::jspi_block_on_promise
    also suspends on any Promise inside a synchronous function, while
    spawn_local is context-aware: tasks spawned from within a JSPI context
    support synchronous JSPI suspensions throughout their call trees.
    Compatible with catch (rejections as Err), async, and
    panic=unwind.
    #​5193

  • Added a --ts-typed-array-buffers CLI flag to declare owned typed-array
    return values (e.g. Vec<u8>) as Uint8Array<ArrayBuffer> in generated
    TypeScript, since they are always copied into a fresh, non-shared
    ArrayBuffer. Requires TypeScript 5.7+.
    #​5263

Changed
  • Export shim symbols are now mangled with a per-crate hash, so identically
    named exports from different crates (or two versions of one crate) no
    longer fail the link with duplicate-symbol errors; the CLI restores the
    canonical names in the final module. Same-named #[wasm_bindgen(private)]
    structs/enums now coexist (numbered Name, Name2, ... internally in the
    generated bindings), while genuinely conflicting public exports are
    reported as a wasm-bindgen error instead of a wasm-ld failure. Requires
    matching wasm-bindgen and CLI versions (schema bump).
    #​2247

  • Setting js_namespace on both an extern "C" block and an item inside it
    is now a hard error. Nested paths must be written in a single attribute,
    e.g. js_namespace = ["a", "b"]. The previous behavior silently dropped
    the block-level namespace.
    #​4324

  • Changed WebGPU setImmediates APIs to take immutable u8 slice.
    #​5289

  • Changed Web Bluetooth writeValue / writeValueWithResponse /
    writeValueWithoutResponse and WebUSB controlTransferOut / transferOut
    / isochronousTransferOut APIs to take immutable u8 slices.
    #​5309

  • Emscripten glue no longer reads wasmExports['name'] inline inside inner
    functions. It now references the asmjs-mangled identifiers emcc's own
    top-level assignWasmExports receiving code binds for every wasm export
    (e.g. ___wbindgen_malloc, ___wbindgen_externrefs), which are the
    canonical DCE-graph pairs: wasm-metadce keeps exactly the exports the
    included glue uses (previously internal exports and the externref table
    could be stripped or left unrenamed by the import/export minifier at -O2,
    breaking at runtime). Hoisted classes are now emitted as =-prefixed
    string value snippets so jsifier declares them as
    export var Class = class Class {...} instead of an export class
    declaration, which crashes emcc's acorn-optimizer under
    -sMODULARIZE=instance.

Fixed
  • C-style #[wasm_bindgen] enums in Vec<T> / Box<[T]> now generate
    TypeScript and JSDoc as EnumName[] instead of any[].
    #​5321

  • Fixed js-sys failing to compile with no_std and the
    futures-core-03-stream feature enabled, since the feature unconditionally
    pulled in futures-util/std. The std feature of futures-util is now only
    enabled by the js-sys std feature.
    #​5322

  • The thread-bootstrap transform is now skipped in Emscripten mode, where the
    Emscripten runtime owns pthread startup and TLS. It previously ran on any
    module with shared memory and aborted the build (failed to find __wasm_init_tls), since Emscripten's linker had already consumed the
    synthetic symbols it looks for.
    #​5315

  • Fixed conflicting deprecation messages on web-sys dictionary fields that
    are themselves deprecated: the deprecated builder-style method no longer
    points at an equally-deprecated setter, and the WebAuthn fields removed from
    the specification (such as PublicKeyCredentialRpEntity's icon) now state
    why they are deprecated.
    #​5302

  • #[wasm_bindgen] on a struct now reports an actionable error when the path
    to the wasm_bindgen crate cannot be resolved (e.g. when wasm-bindgen is
    only a transitive dependency through web-sys), instead of a confusing
    recursion limit error.
    #​5295

  • Fixed js_namespace exports missing from the bundler target's entry module
    re-export list, making namespaces unreachable when importing the package.
    #​5267

  • The CLI now reports an actionable error when the __wasm_bindgen_unstable
    custom section is missing from a module that still contains wasm-bindgen
    shims (e.g. stripped by llvm-objcopy --strip-all, which removes all custom
    sections since LLVM 23), instead of the confusing
    import of `X` doesn't have an adapter listed.
    #​5268

  • The generated &T handle conversions (IntoWasmAbi/OptionIntoWasmAbi) for
    an imported type with lifetime parameters (type Holder<'a, T>) no longer
    reuse 'a for the reference itself. Previously the impl header declared only
    a fresh 'a plus the type's type parameters, so a type whose lifetime was
    not literally named 'a failed with E0261 against generated code, and one
    that was named 'a had its lifetime forced to unify with the borrow of
    &self — surfacing as E0521 whenever a generic method also had to resolve
    through the same impl.
    #​5290

  • An inline lifetime bound on a generic import (fn f<'a: 'b, 'b, T>(..)) is no
    longer dropped from the generated wrapper. Previously the bound was lost while
    the generated shim still declared it, so calling the import failed with
    "lifetime may not live long enough" reported against generated code.
    #​5290

  • A type-parameter default on a #[wasm_bindgen(experimental_generic_mono)] import is no
    longer silently ignored. It has no meaning there (every instantiation gets its
    own shim, so there is no single one to default) and rustc's own
    invalid_type_param_default lint cannot see it, since nothing of the original
    signature survives expansion; it is now rejected with the same
    defaults for generic parameters are not allowed here diagnostic rustc gives.
    Defaults on the type-erasure generic path are unaffected, where they remain
    meaningful.
    #​5290

  • Fix js-sys wasm64 build with atomics feature.
    #​5274

  • Declare initSync in the generated TypeScript definitions for
    --target no-modules, matching the wasm_bindgen.initSync function that
    the JS output already exposes.
    #​5284

  • Removed the last panicking code paths from externref table management:
    RefCell::borrow_mut() embedded panic location data (including the source
    path string) in .rodata of optimized builds, which not even wasm-opt
    could remove.
    #​5292

  • Fix --no-modules-global being ignored: the custom global name is now used
    for the generated JS binding and TypeScript declarations, and the name is
    validated as a JS identifier.
    #​5286


Configuration

📅 Schedule: (in timezone America/Los_Angeles)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

@ki7dk

ki7dk commented Sep 5, 2026

Copy link
Copy Markdown
Member Author

⚠️ Artifact update problem

Renovate failed to update artifacts related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: rust-analyst/Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path rust-analyst/Cargo.toml --package js-sys@0.3.104 --precise 0.3.105
    Updating crates.io index
error: failed to select a version for the requirement `js-sys = "=0.3.104"`
candidate versions found which didn't match: 0.3.105
location searched: crates.io index
required by package `wasm-bindgen-futures v0.4.77`
    ... which satisfies dependency `wasm-bindgen-futures = "^0.4"` (locked to 0.4.77) of package `wasm-analyst v0.1.0 (/tmp/renovate/repos/github/tissue-systems/tissue-examples/rust-analyst)`

File name: rust-g7-store/Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path rust-g7-store/Cargo.toml --package js-sys@0.3.104 --precise 0.3.105
    Updating crates.io index
error: failed to select a version for the requirement `js-sys = "=0.3.104"`
candidate versions found which didn't match: 0.3.105
location searched: crates.io index
required by package `wasm-bindgen-futures v0.4.77`
    ... which satisfies dependency `wasm-bindgen-futures = "^0.4"` (locked to 0.4.77) of package `rust-g7-store v0.1.0 (/tmp/renovate/repos/github/tissue-systems/tissue-examples/rust-g7-store)`

File name: rust-phonebook/Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path rust-phonebook/Cargo.toml --package js-sys@0.3.104 --precise 0.3.105
    Updating crates.io index
error: failed to select a version for the requirement `js-sys = "=0.3.104"`
candidate versions found which didn't match: 0.3.105
location searched: crates.io index
required by package `wasm-bindgen-futures v0.4.77`
    ... which satisfies dependency `wasm-bindgen-futures = "^0.4"` (locked to 0.4.77) of package `wasm-phonebook v0.1.0 (/tmp/renovate/repos/github/tissue-systems/tissue-examples/rust-phonebook)`

File name: rust-primes/Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path rust-primes/Cargo.toml --package js-sys@0.3.104 --precise 0.3.105
    Updating crates.io index
error: failed to select a version for the requirement `js-sys = "=0.3.104"`
candidate versions found which didn't match: 0.3.105
location searched: crates.io index
required by package `wasm-bindgen-futures v0.4.77`
    ... which satisfies dependency `wasm-bindgen-futures = "^0.4"` (locked to 0.4.77) of package `wasm-primes v0.1.0 (/tmp/renovate/repos/github/tissue-systems/tissue-examples/rust-primes)`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant