Update cargo dependencies#1208
Conversation
|
No changeset foundThis PR modifies the following packages but doesn't include a changeset: Directly changed:
Downstream dependencies (also need a version bump):
Click here to create a changeset The link pre-populates a changeset file with If this change doesn't require a version bump, add the |
fce192c to
b387d1c
Compare
| prost = "0.14" | ||
| prost-build = "0.14" | ||
| prost-types = "0.14" | ||
| rand = "0.9" | ||
| rand = "0.10" |
There was a problem hiding this comment.
🟡 Missing changeset file for dependency version bumps
No changeset file was added for this PR (/.changeset/ is unchanged), violating the repository rule that every PR needs a changeset.
Impact: The release tooling (knope) will not document these dependency changes, and the PR does not meet the repository's contribution requirements.
AGENTS.md changeset requirement
AGENTS.md states under "Documenting changes":
- "Every PR needs a changeset"
- "Changeset must list any crates which need to be bumped stemming from the change"
- "Document changes interactively from the CLI with
knope document-changeor create manually in/.changeset"
This PR bumps versions of many dependencies across multiple crates (Cargo.toml:64-76, livekit-api/Cargo.toml:106-135, livekit-protocol/Cargo.toml:10-13, livekit/Cargo.toml:40-52, etc.) but adds no corresponding changeset file. The .changeset/ directory contains only pre-existing changesets from prior PRs.
(Refers to lines 64-76)
Prompt for agents
A changeset file needs to be created in the .changeset/ directory for this PR. Run `knope document-change` interactively, or manually create a markdown file in /.changeset/ that lists all crates affected by these dependency bumps (livekit, livekit-api, livekit-protocol, livekit-ffi, libwebrtc, device-info, livekit-wakeword, livekit-uniffi). The changeset should describe the dependency version updates made in this PR.
Was this helpful? React with 👍 or 👎 to provide feedback.
| prost = "0.14" | ||
| prost-build = "0.14" | ||
| prost-types = "0.14" | ||
| rand = "0.9" | ||
| rand = "0.10" |
There was a problem hiding this comment.
🔍 Cargo.lock not regenerated after dependency version bumps
The root Cargo.lock was not modified in this PR, but the Cargo.toml files now require versions that conflict with what's locked. For example, Cargo.toml:76 specifies rand = "0.10" but Cargo.lock still resolves rand 0.9.3 for workspace crates. Similarly, livekit-protocol/Cargo.toml:10 requires prost = "0.14" but the lock file pins prost 0.12.6 for livekit-protocol. This applies to nearly every bumped dependency: sha2, hmac, base64, pbjson, pbjson-types, console-subscriber, glib, resampler, ort-tract, async-tungstenite, reqwest, libloading, jni, and windows-sys. Running cargo build --locked will fail. The lock file needs to be regenerated with cargo update.
(Refers to lines 64-76)
Was this helpful? React with 👍 or 👎 to provide feedback.
| sha2 = "0.11" | ||
| url = "2.3" | ||
| log = { workspace = true } | ||
| parking_lot = { workspace = true } | ||
| prost = "0.12" | ||
| pbjson-types = "0.6" | ||
| prost = "0.14" | ||
| pbjson-types = "0.9" | ||
|
|
||
| # webhooks | ||
| serde_json = { workspace = true, optional = true } | ||
| base64 = { version = "0.21", optional = true, features = ["std"] } | ||
| base64 = { version = "0.22", optional = true, features = ["std"] } | ||
|
|
||
| # access_token: HS256 only, via the in-crate HMAC CryptoProvider (jwt_provider.rs). | ||
| # Dropping jsonwebtoken's rust_crypto bundle avoids linking RSA/EC/EdDSA. | ||
| jsonwebtoken = { version = "10", default-features = false, optional = true } | ||
| hmac = { version = "0.12", optional = true } | ||
| hmac = { version = "0.13", optional = true } | ||
| signature = { version = "2", optional = true } | ||
|
|
||
| # signal_client | ||
| livekit-runtime = { workspace = true, optional = true} | ||
| tokio-tungstenite = { version = "0.29", features = ["url"], optional = true } | ||
| async-tungstenite = { version = "0.29", features = [ "async-std-runtime", "async-native-tls", "url"], optional = true } | ||
| async-tungstenite = { version = "0.34", features = [ "async-std-runtime", "async-native-tls", "url"], optional = true } | ||
| tokio = { workspace = true, default-features = false, features = ["sync", "macros", "signal", "io-util", "net"], optional = true } |
There was a problem hiding this comment.
🔍 Multiple semver-breaking bumps for pre-1.0 crates need API compatibility verification
For pre-1.0 crates, a minor version bump (e.g., 0.9→0.10) is a breaking change under semver. This PR includes several such bumps: rand 0.9→0.10, prost 0.12→0.14, sha2 0.10→0.11, hmac 0.12→0.13, pbjson/pbjson-types 0.6→0.9, jni 0.21→0.22, glib 0.21→0.22, resampler 0.4→0.5, and async-tungstenite 0.29→0.34. No source code changes accompany these bumps, which suggests either the APIs are backward-compatible or the code hasn't been updated yet. Particularly notable: jni 0.22 switches from jni-sys 0.3 to jni-sys 0.4 which changes the underlying jobject type — this could affect livekit-ffi/src/cabi.rs:118-203 and device-info/src/native/android.rs:16-72. The prost 0.12→0.14 jump may require regenerating protobuf code in livekit-protocol.
Was this helpful? React with 👍 or 👎 to provide feedback.
| prost = "0.14" | ||
| serde = { workspace = true } | ||
| pbjson = "0.6" | ||
| pbjson-types = "0.6" | ||
| pbjson = "0.9" | ||
| pbjson-types = "0.9" |
There was a problem hiding this comment.
🔍 prost version mismatch risk across workspace crates
The workspace Cargo.toml:73 defines prost = "0.14" and livekit-ffi already uses prost 0.14.3 per the lock file. However, livekit-protocol/Cargo.toml:10, livekit-api/Cargo.toml:110, and livekit/Cargo.toml:40 each declare their own prost dependency (not using workspace) and were bumped from "0.12" to "0.14". The lock file still shows these crates depending on prost 0.12.6. If prost 0.12 and 0.14 types are not interchangeable (they aren't — prost::Message is a different trait in each major version), then code passing protobuf messages between crates compiled against different prost versions would fail to compile. Once the lock file is regenerated, all crates should resolve to prost 0.14, but this should be verified.
Was this helpful? React with 👍 or 👎 to provide feedback.
Generated by renovateBot
b387d1c to
3e09197
Compare
| prost = "0.14" | ||
| prost-build = "0.14" | ||
| prost-types = "0.14" | ||
| rand = "0.9" | ||
| rand = "0.10" |
There was a problem hiding this comment.
🔴 Dependency lockfile not regenerated after version bumps, causing build failures
The dependency version specifications are updated in multiple Cargo.toml files (Cargo.toml:67,79) but the main Cargo.lock is not regenerated, so builds using --locked will fail immediately.
Impact: CI and reproducible builds will fail because the lockfile still pins old versions that no longer satisfy the new Cargo.toml requirements.
Lockfile vs Cargo.toml version mismatches across the workspace
The PR updates version requirements in Cargo.toml files but the root Cargo.lock was never regenerated (zero diff on Cargo.lock). Every updated dependency has a mismatch:
rand: lockfile has 0.9.3, Cargo.toml requires"0.10"(Cargo.toml:79)console-subscriber: lockfile has 0.1.10, Cargo.toml requires"0.5"(Cargo.toml:67)sha2: lockfile has 0.10.9, Cargo.toml requires"0.11"(livekit-api/Cargo.toml:106)hmac: lockfile has 0.12.1, Cargo.toml requires"0.13"(livekit-api/Cargo.toml:120)base64: lockfile has 0.21.7, Cargo.toml requires"0.22"(livekit-api/Cargo.toml:115)prost: lockfile has 0.12.6, Cargo.toml requires"0.14"(livekit-protocol/Cargo.toml:10,livekit-api/Cargo.toml:110,livekit/Cargo.toml:40)pbjson/pbjson-types: lockfile has 0.6.0, Cargo.toml requires"0.9"(livekit-protocol/Cargo.toml:12-13,livekit-api/Cargo.toml:111)reqwest: lockfile has 0.12.28, Cargo.toml requires"0.13"(livekit-api/Cargo.toml:135)async-tungstenite: lockfile has 0.29.1, Cargo.toml requires"0.34"(livekit-api/Cargo.toml:126)resampler: lockfile has 0.4.1, Cargo.toml requires"0.5"(livekit-wakeword/Cargo.toml:12)ort-tract: lockfile has 0.2.0, Cargo.toml requires"0.3.0"(livekit-wakeword/Cargo.toml:17)glib: lockfile has 0.21.5, Cargo.toml requires"0.22.0"(libwebrtc/Cargo.toml:26)windows-sys: lockfile has 0.59.0, Cargo.toml requires"0.61"(device-info/Cargo.toml:19)jni: lockfile has 0.21.1, Cargo.toml requires"0.22"(device-info/Cargo.toml:26,libwebrtc/Cargo.toml:29,livekit-ffi/Cargo.toml:43)libloading: lockfile has 0.8.9, Cargo.toml requires"0.9.0"(livekit/Cargo.toml:52)
Note that the fuzz sub-lockfile (livekit-datatrack/fuzz/Cargo.lock) WAS updated, suggesting the main lockfile was simply forgotten.
(Refers to lines 67-79)
Prompt for agents
The main Cargo.lock file was not regenerated after updating dependency versions in Cargo.toml. Run `cargo update` or `cargo generate-lockfile` to regenerate the lockfile so it satisfies the new version requirements. The fuzz sub-lockfile at livekit-datatrack/fuzz/Cargo.lock was updated, but the root Cargo.lock was not. After regenerating, verify that all workspace crates compile successfully, as some of these are major version bumps that may require code changes (e.g., rand 0.9->0.10 may have removed deprecated APIs like thread_rng() and gen() that are still used in examples/rpc/src/main.rs:48).
Was this helpful? React with 👍 or 👎 to provide feedback.
| prost-build = "0.14" | ||
| prost-types = "0.14" | ||
| rand = "0.9" | ||
| rand = "0.10" |
There was a problem hiding this comment.
🔍 Example code uses deprecated rand API that will break when lockfile is updated
The rpc example at examples/rpc/src/main.rs:48 uses rand::thread_rng().gen::<u32>(), which relies on APIs deprecated in rand 0.9 (thread_rng() renamed to rng(), gen() renamed to random()). The rest of the codebase has already migrated to the new API (e.g., livekit-api/src/services/room.rs:435 uses rand::rng() and livekit-datatrack/src/packet/time.rs:24 uses .random::<u32>()). When the Cargo.lock is regenerated for rand 0.10, this call will likely fail to compile since deprecated aliases are typically removed in the next major version. This line should be updated to rand::rng().random::<u32>() to match the rest of the codebase.
Was this helpful? React with 👍 or 👎 to provide feedback.
This PR contains the following updates:
0.29→0.340.21→0.221.11.1→1.12.01.11.1→1.12.01.2.2→1.2.31.2.41.2.57→1.2.651.2.660.4.41→0.4.454.6.0→4.6.10.1→0.50.21.3→0.22.00.22.80.12→0.131.4.0→1.4.21.4.0→1.4.22.13.0→2.14.01.7.2→1.8.21.8.30.21.1→0.22.00.21→0.220.3.91→0.3.1020.3.10310.3.0→10.4.00.2.183→0.2.1860.4.12→0.4.130.8.6→0.9.03.8.3→3.9.43.10.3(+3)2.3.1→2.3.23.5.2→3.5.73.5.9(+1)2.0.0-rc.11→2.0.0-rc.120.2.0+0.22→0.3.03.14.0→3.15.00.6→0.90.6→0.90.3.32→0.3.330.12→0.140.14.3→0.14.40.14.3→0.14.40.14.3→0.14.40.9→0.100.10.21.11.0→1.12.01.12.3→1.12.41.12.3→1.12.40.12→0.130.4→0.50.3.3→0.3.40.8.3→0.8.41.0.27→1.0.281.0.149→1.0.1501.0.149→1.0.1503.4.0→3.5.00.10→0.110.2.19→0.2.211.50.0→1.52.31.50.0→1.52.390f2c6f→98aceaf0.2.114→0.2.1250.2.1260.4.64→0.4.750.4.760.3.91→0.3.1020.3.1030.59→0.61Release Notes
sdroege/async-tungstenite (async-tungstenite)
v0.34.1Compare Source
Added
futures-rustlsfeatures for rustls support via the smol runtime.Fixed
Changed
v0.34.0Compare Source
Changed
Added
v0.33.0Compare Source
Changed
v0.32.1Compare Source
Added
tokio-rustls-platform-verifierfeature to use that crate forcertificate verification.
v0.32.0Compare Source
Changed
Added
WebSocketStream::into_inner()to get the underlying stream.v0.31.0Compare Source
Changed
WebSocketSender::send()andclose()require a mutable reference now.v0.30.0Compare Source
Changed
Added
WebSocketStreaminto a sender and receivertype without making use of the future's
Sinktrait, and re-combining themagain into a single value.
rust-lang/cc-rs (cc)
v1.2.65Compare Source
Other
v1.2.64Compare Source
Other
v1.2.63Compare Source
Other
v1.2.62Compare Source
Other
v1.2.61Compare Source
Other
OutputKind::Capturedocumentation (#1705)v1.2.60Compare Source
Fixed
Dmodifier probe (#1700)v1.2.59Compare Source
Fixed
Dmodifier (#1697)Other
v1.2.58Compare Source
Other
chronotope/chrono (chrono)
v0.4.45: 0.4.45Compare Source
What's Changed
v0.4.44: 0.4.44Compare Source
What's Changed
Cargo.tomlcontents by @coryan in #1772v0.4.43: 0.4.43Compare Source
What's Changed
NaiveDate::abs_diffby @Kinrany in #1752v0.4.42: 0.4.42Compare Source
What's Changed
wasm32-linuxsupport by @arjunr2 in #1707tzdataparsing by @ldm0 in #1679?Sizedbound to related methods ofDelayedFormat::write_toby @Huliiiiii in #1721from_timestamp_secsmethod toDateTimeby @jasonaowen in #1719gtk-rs/gtk-rs-core (glib)
v0.22.7Compare Source
v0.22.6Compare Source
v0.22.5Compare Source
v0.22.4Compare Source
v0.22.3Compare Source
v0.22.2Compare Source
v0.22.0Compare Source
stanislav-tkach/os_info (os_info)
v3.15.0Compare Source
KDE neon support has been added. (#433)
Hurd support has been added. (#434)
Bazzite support has been added. (#435)
The codename detection from files has been fixed. (#436)
rust-random/rand (rand)
v0.10.1Compare Source
This release includes a fix for a soundness bug; see #1763.
Changes
make_rngand add#[track_caller](#1761)log(#1763)v0.10.0Compare Source
Changes
rand_chachahas been replaced with a dependency onchacha20. This changes the implementation behindStdRng, but the output remains the same. There may be some API breakage when using the ChaCha-types directly as these are now the ones inchacha20instead ofrand_chacha(#1642).IndexedRandom::choose_multiple->sample,choose_multiple_array->sample_array,choose_multiple_weighted->sample_weighted, structSliceChooseIter->IndexedSamplesand fnsIteratorRandom::choose_multiple->sample,choose_multiple_fill->sample_fill(#1632)Fillbe implemented for element types, not sliceable types (#1652)OsError::raw_os_erroron UEFI targets by returningOption<usize>(#1665)TryRngCore::read_adapter(..) -> RngReadAdapterwith simpler structRngReader(#1669)SeedableRng::from_os_rng,try_from_os_rng(#1674)Clonesupport forStdRng,ReseedingRng(#1677)postcardinstead ofbincodeto test the serde feature (#1693)IteratorRandom::samplewhenamountis much larger than iterator size (#1695)os_rng->sys_rng,OsRng->SysRng,OsError->SysError(#1697)Rng->RngExtas upstreamrand_corehas renamedRngCore->Rng(#1717)Additions
IndexedRandom::choose_iter,choose_weighted_iter(#1632)Xoshiro128PlusPlus,Xoshiro256PlusPlusprngs (#1649)ChaCha8Rng,ChaCha12Rng,ChaCha20Rngbehindchachafeature (#1659)rand::make_rng() -> R where R: SeedableRng(#1734)Removals
ReseedingRng(#1722)small_rng(#1732)v0.9.4Compare Source
Fixes
Full Changelog: rust-random/rand@0.9.3...0.9.4
rust-lang/regex (regex)
v1.12.4Compare Source
===================
This release includes a performance optimization for compilation of regexes
with very large character classes.
Improvements:
Avoid re-canonicalizing the entire interval set when pushing new class ranges.
d-e-s-o/test-log (test-log)
v0.2.21Compare Source
rust-analyzerinteractionv0.2.20Compare Source
test-log-corecrate to facilitate better testingwasm-bindgen/wasm-bindgen (wasm-bindgen)
v0.2.125Compare Source
Added
--force-enable-abort-handlerCLI flag, which emits the hard-abortdetection and
set_on_abortmachinery onpanic=abortbuilds. Withpanic=unwindthis machinery is generated automatically; the flag doesnothing there.
#5191
Changed
__wbindgen_destroy_closureexport private in the Rust API.#5196
v0.2.123Compare Source
Added
Added the
maxAgeattribute to theCookieInitdictionary inweb-sys,matching the current Cookie Store API specification.
#5169
The js-sys futures codegen opt-in can now also be enabled via the
WASM_BINDGEN_USE_JS_SYS=1environment variable, in addition to--cfg=wasm_bindgen_use_js_sys. This works on stable when--targetis in use, where Cargo does not propagate the cfg to host proc-macros.
#5164
Changed
JsOption<T>now treats onlyundefinedas empty, aligning it withTypeScript's strict
T | undefinedsemantics and withOption<T>'s wireshape (
None↔undefined). Previouslyis_empty,as_option,into_option,unwrap,expect,unwrap_or_default, andunwrap_or_elsetreated bothnullandundefinedas absent; JSnullis now a distinct present value. The
impl<T> UpcastFrom<Null> for JsOption<T>is removed (Undefinedstill models absence), and theDebug/Displayabsent placeholder changed from"null"to"undefined". Code relying onnull → Noneshould returnundefinedfrom the JS side, or check explicitly with
val.as_option().filter(|v| !v.is_null()).#5170
Fixed
Removed invalid
js_sys::Array<T>tojs_sys::ArrayTuple<(...)>upcasts.ArrayTupleencodes a fixed tuple arity, while a plain JavaScript array doesnot prove that arity statically.
Fixed incorrect variance in
&mutreference upcasting.&mut Tupcastswere covariant in the pointee, so a
&mut Tcould be widened to a&mutof a supertype and used to write back a value the original type would not
accept, leaving a reference whose static type no longer matches the value
it points to. Mutable references are now invariant in their pointee:
&mut Tonly upcasts to&mut Targetwhen bothTarget: UpcastFrom<T>and
T: UpcastFrom<Target>hold. This rejects the invalid widening but isa breaking change for callers that relied on widening
&mutreferences.#5176
Fixed WASI targets (
wasm32-wasip1/wasm32-wasip2) emitting unresolved__wbindgen_placeholder__imports, which broke component linking. Thecodegen and runtime gates now exclude
target_os = "wasi"(restoring thepre-0.2.115 stub behavior), including the
panic = "unwind"paths inwasm-bindgen-futures.#5175
Fixed a panic ("Unhandled load width 8") in the descriptor interpreter when
processing
-Cinstrument-coverage-instrumented modules, unblockingcargo llvm-cov --target wasm32-unknown-unknownfor crates whose describehelpers get instrumented.
#5179
Fixed
mainsilently never running on wasm64 for bin crates.#5181
v0.2.122Compare Source
Notices
Threading support now requires
-Clink-arg=--export=__heap_baseto be setin
RUSTFLAGSfor nightly toolchains from 2026-05-06 onward, afterrust-lang/rust#156174
removed the implicit
__heap_base/__data_endexports onwasm*targets. Atomics CI, CLI reference tests, and the
nodejs-threads,raytrace-parallel, andwasm-audio-workletexamples have beenupdated to pass
--export=__heap_baseexplicitly. The flag isbackward-compatible with older nightlies.
-Cpanic=unwindon wasm targets now emits modern (exnref) exceptionhandling by default after
rust-lang/rust#156061,
and requires Node.js 22.22.3+ (for
WebAssembly.JSTag). Legacy EH wasmcan still be produced on current nightlies by adding
-Cllvm-args=-wasm-use-legacy-ehtoRUSTFLAGS; Node.js 20 may besupported with legacy exception handling, with a tracking issue in
#5151.
Added
Implemented
TryFromJsValueforVec<T>whereT: TryFromJsValue.A JS value converts when it is a real
Array(perArray.isArray)and every element converts via
T::try_from_js_value. This composesrecursively (
Vec<Vec<String>>,Vec<Option<T>>) and works for anyTwith aTryFromJsValueimpl, including primitives,String,JsValue, andJsCasttypes. Array-likes (objects withlengthandnumeric indices) are intentionally rejected to mirror the static ABI
representation used by
js_value_vector_from_abi.New
extends_js_classandextends_js_namespaceattributes onexported structs to allow defining the parent
js_classname whenit has been customized by
js_nameand the parent's ownjs_namespaceas well in turn. New validation is added at code generation time that
will now catch these cases instead of emitting invalid code. Example:
#5154
Changed
When an exported struct uses
js_namespace, the corresponding valuemust now be repeated on every
implblock. Previously the impl-sidedefaults silently worked resulting in inconsistent emission. Example:
To ease this transition for
js_namespaceusage, diagnosticmessages now include hints for missing namespaces for easier
fixing.
#5154
Fixed
Fixed the descriptor interpreter panicking on
BrandBrIfinstructions emitted by recent nightly compilers when building with
panic=unwind.#5158
Emscripten output now works against vanilla upstream emscripten without
requiring a fork. Dependency tracking,
HEAP_DATA_VIEWsetup,function-decl intrinsic inlining, catch-wrapper gating, and imported
global handling have all been corrected; ESM imports
(
#[wasm_bindgen(module = "...")]and snippets) are emitted to asidecar
library_bindgen.extern-pre.jsconsumers pass to emcc via--extern-pre-js; namespaced exports (js_namespace = [...]on astruct/impl) now attach to
Module.<segments>instead of emittingtop-level
export const(which emcc's library evaluator rejects);the generated
.d.tsfor namespaced exports is now valid TypeScript(mangled identifiers stay module-internal via
declare class/declare enum/declare functionplusexport { BindgenModule };to mark the file as a module; no spurious unqualified
Calc:property on
BindgenModulefor namespaced items; namespace shapesland as plain interface members (
app: { math: { Calc: typeof app__math__Calc } };) instead of the previously-emittedexport let app: { ... };which was invalid TS1131 syntax inside aninterface body).
#5156
Fixed a duplicate phantom class being emitted for an exported struct
renamed via
js_name(Rust ident != JS class name) and/or placed in ajs_namespace, when the struct crosses the boundary as aJsValue(e.g. via
.into()). TheWrapInExportedClass/UnwrapExportedClassimports were keyed by the Rust ident rather than the qualified JS name
that
exported_classesis keyed by (a regression from #5154), so afresh empty class entry was minted and emitted alongside the real one,
with a
free()referencing a nonexistent wasm export. Riding thesame release's #5154 wire-format bump, the now-vestigial
rust_namefield is dropped from the schema and the namespace-qualified name is
no longer cached on
AuxStruct,AuxEnum, orExportedClass(derived on demand from
(name, js_namespace)), collapsing threefallback chains that only papered over the pre-#5154 keying.
#5160
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
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](
Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.