You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From this release forward, html5ever, xml5ever, markup5ever, and match_token are now released using a synced version number. Thus this release is version 0.35.0 of all of these crates.
Changes
Version numbers of all crates apart from web_atoms are now in sync. (#637)
Fix unsoundness in OnceCell::wait under --features=parking_lot, #295.
If thread A calls wait, while thread B calls get_or_try_init(f), and, furthermore, f panics,
the wait incorrectly returns and thread A observes uninitialized memory.
===================
This release excludes some unnecessary things from the archive published to
crates.io. Specifically, fuzzing data and various shell scripts are now
excluded. If you run into problems, please file an issue.
Improvements:
#1319:
Switch from a Cargo exclude list to an include list, and exclude some
unnecessary stuff.
===================
This release fixes a cargo doc breakage on nightly when --cfg docsrs is
enabled. This caused documentation to fail to build on docs.rs.
Bug fixes:
BUG #1305:
Switches the doc_auto_cfg feature to doc_cfg on nightly for docs.rs builds.
===================
This release makes a bug fix in the new regex::Captures::get_match API
introduced in 1.12.0. There was an oversight with the lifetime parameter
for the Match returned. This is technically a breaking change, but given
that it was caught almost immediately and I've yanked the 1.12.0 release,
I think this is fine.
===================
This release contains a smattering of bug fixes, a fix for excessive memory
consumption in some cases and a new regex::Captures::get_match API.
Improvements:
FEATURE #1146:
Add Capture::get_match for returning the overall match without unwrap().
Bug fixes:
BUG #1083:
Fixes a panic in the lazy DFA (can only occur for especially large regexes).
BUG #1116:
Fixes a memory usage regression for large regexes (introduced in regex 1.9).
BUG #1195:
Fix universal start states in sparse DFA.
BUG #1295:
Fixes a panic when deserializing a corrupted dense DFA.
BUG 8f5d9479:
Make regex_automata::meta::Regex::find consistently return None when WhichCaptures::None is used.
===================
This is a new patch release of regex with some minor fixes. A larger number
of typo or lint fix patches were merged. Also, we now finally recommend using std::sync::LazyLock.
Improvements:
BUG #1217:
Switch recommendation from once_cell to std::sync::LazyLock.
BUG #1225:
Add DFA::set_prefilter to regex-automata.
Bug fixes:
BUG #1165:
Remove std dependency from perf-literal-multisubstring crate feature.
BUG #1165:
Clarify the meaning of (?R)$ in the documentation.
BUG #1281:
Remove fuzz/ and record/ directories from published crate on crates.io.
Fix the Clone implementation of the Owned* types generated with the IdDst macro. It used to always create a new instance from the borrowed type instead of using the Clone implementation of the internal type.
Improvements:
Add AppserviceUserIdentity::maybe_add_to_uri() to add an identity assertion to an http::Uri. This allows to reimplement the behavior of OutgoingRequestAppserviceExt::try_into_http_request_with_identity() outside of Ruma, if using this trait is inconvenient.
Add MatrixVersion::V1_17.
JoinRule holds arbitrary data in its fallback variant, with can be accessed with JoinRule::data(). It also means that this type won't fail to serialize for undocumented variants anymore.
Merge the PartialOrdAsRefStr derive macro into OrdAsRefStr, so both traits are always implemented using the same logic.
Rename the PartialEqAsRefStr derive macro to EqAsRefStr and make it implement both PartialEq and Eq.
The StringEnum derive macro also implements Ord, PartialOrd, Eq and PartialEq using the AsRef<str> implementation of the enum.
The predefined push rules for legacy mentions PatternedPushRule::contains_user_name(), ConditionalPushRule::contains_display_name() and ConditionalPushRule::roomnotif() were removed, according to MSC4210. Their rule IDs are still available in PredefinedContentRuleId and PredefinedOverrideRuleId, and they are still supported in PatternedPushRule::applies_to() and ConditionalPushRule::applies(), for backwards-compatibility for clients.
Macros no longer support importing the ruma and ruma-events crate from the matrix-sdk-appservice crate. This crate was dropped 2 years ago.
Metadata was changed from a struct to a trait. It is a supertrait of OutgoingRequest and IncomingRequest, and its fields are now associated types or constants.
The authentication field of the Metadata struct is now an associated type named Authentication. The AuthScheme enum was changed from an enum to a trait. Its variants are now structs implementing the AuthScheme trait. The None variant was renamed to NoAuthentication and the ServerSignatures variant was moved to ruma-federation-api. The access_token argument of OutgoingRequest::try_into_http_request() is renamed to authentication_input and is generic over the Input associated type of the AuthScheme trait.
The history field of the Metadata struct is now an associated constant named PATH_BUILDER. The type of this constant is defined by the PathBuilder associated type, which must implement the PathBuilder trait. The considering argument of OutgoingRequest::try_into_http_request() is renamed to path_builder_input and is generic over the Input associated type of the PathBuilder trait. The Input of VersionHistory was changed from &'_ SupportedVersions to Cow<'_, SupportedVersions>.
The other fields of the Metadata struct are now associated constants with the same name converted to uppercase.
The metadata! macro generates the Metadata trait implementation for a type named Request by default. This type can be changed with an @for setting.
The http_headers module is now behind the api cargo feature.
OutgoingRequestAppserviceExt::try_into_http_request_with_user_id() is renamed to try_into_http_request_with_identity() and takes an AppserviceUserIdentity instead of a UserId. This allows to specify a device ID, according to MSC4326.
IntoHttpError::NeedsAuthentication is a newtype variant renamed to Authentication that accepts any error type.
Remove support for the following rules for the StringEnum, AsRefStr and FromString derive macros' rename_all attribute, because they either can be replaced by the (prefix = "prefix", rule = "rule") syntax or are unused as far as we know:
"PascalCase"
"SCREAMING-KEBAB-CASE"
"m.dotted.case"
"M_MATRIX_ERROR_CASE"
"m.lowercase"
"m.snake_case"
".m.rule.snake_case"
"m.role.snake_case"
Bug fixes:
With the request and response attribute macros, the Content-Type header defaults to application/octet-stream instead of application/json if the raw_body attribute is set on a field.
Fix the check to make sure that all paths used to build VersionHistory contain the same number of variables. It was broken since the syntax was changed from :variable to {variable}.
Improvements:
Add org.matrix.msc4380 unstable feature support to /versions.
Add MatrixVersion::V1_16
Remove support for the org.matrix.hydra.11 room version and the corresponding unstable-hydra cargo feature. It should only have been used for development, and room version 12 should be used instead.
Metadata::make_endpoint_url() is also available as VersionHistory::make_endpoint_url().
PushCondition::ContainsDisplayName is deprecated, according to MSC4210.
Add SinglePath as a PathBuilder. It should be used for APIs that don't have a /versions endpoint and for endpoints that can't be versioned.
AuthScheme data can be extracted from incoming HTTP requests with AuthScheme::extract_authentication().
The StringEnum, AsRefStr and FromString derive macros allow to set a custom prefix alongside the rule to rename all the variants, like this: #[ruma_enum(rename_all(prefix = "m.", rule = "snake_case"))]. The previous syntax using #[ruma_enum(rename_all = "snake_case")] still works and assumes that the prefix is empty.
PushCondition::applies, ConditionalPushRule::applies, AnyPushRuleRef::applies, AnyPushRule::applies, Ruleset::applies, Ruleset::get_actions, Ruleset::get_match all became async, to allow for lazy evaluation of push rules.
UserId parsing and deserialization are now compatible with all non-compliant user IDs in the wild by default, due to a clarification in the spec.
The compat-user-id cargo feature was removed.
UserId::validate_historical() and UserId::validate_strict() allow to check for spec compliance.
The (owned_)user_id! macros always validate against the strict grammar in the spec, regardless of the compat features that are enabled.
(owned_)room_id! macros disallow the NUL byte, due to a clarification in the spec.
(owned_)room_alias_id! macros disallow the NUL byte for the localpart, due to a clarification in the spec.
MatrixVersion does not implement Display anymore as it is not correct to convert V1_0 to a string. Instead MatrixVersion::as_str() can be used that only returns None for that same variant.
MatrixVersion::(into/from)_parts are no longer exposed as public methods. They were usually used to sort MatrixVersions, now the PartialOrd and Ord implementations can be used instead.
Protocol and ProtocolInit are generic on the protocol instance type.
Add support for endpoints that only allow appservices to call them, renaming AppserviceToken to AppserviceTokenOptional, with the new variant taking AppserviceToken's place.
The redact* functions in canonical_json take RedactionRules instead of RoomVersionId. This avoids undefined behavior for unknown room versions.
OutgoingRequest::try_into_http_request(), OutgoingRequestAppserviceExt::try_into_http_request_with_user_id() and Metadata::make_endpoint_url() take a SupportedVersions instead of a &[MatrixVersion].
The metadata macro allows to specify stable and unstable feature flags for the paths in history.
VersionHistory::new() takes a &'static [(Option<&'static str>, &'static str)] for the unstable paths and a &'static [(StablePathSelector, &'static str)] for the stable paths.
VersionHistory::unstable_paths() returns an impl Iterator<Item = (Option<&'static str>, &'static str)>.
VersionHistory::stable_paths() returns an impl Iterator<Item = (StablePathSelector, &'static str)>.
VersionHistory::stable_endpoint_for() was renamed to version_path().
VersioningDecision's Stable variant was renamed to Version and Unstable was renamed to Feature.
The syntax of variables in endpoint paths segments in the metadata macro has changed: the variable must now be surrounded by {} instead of being preceded by :. For example /_matrix/client/foo/{bar}. This matches the OpenAPI syntax and the new syntax supported by axum 0.8.
JoinRule and its associated types where imported from ruma-events into the room module.
space::SpaceRoomJoinRule was removed and replaced by room::JoinRuleSummary.
directory::PublicRoomJoinRule was moved and renamed to room::JoinRuleKind.
It can be constructed with JoinRule::kind() and JoinRuleSummary::kind().
Make PushConditionRoomCtx and PushConditionPowerLevelsCtx non-exhaustive.
The versions field of SupportedVersions is now a BTreeSet<MatrixVersion>, to make sure that the versions are always deduplicated and sorted.
NotificationPowerLevels now takes a NotificationPowerLevelsKey for the key, an enum that accepts any string.
The key field of PushCondition::SenderNotificationPermission uses the same type.
RoomId::new() was renamed to RoomId::new_v1(), as several formats are now supported for this type.
StateResolutionVersion::V2 now takes StateResolutionV2Rules as a unit field, to specify tweaks to be used when resolving state with version 2 of the state resolution algorithm.
This field can be accessed with StateResolutionVersion::v2_rules, returning None if state_res is not StateResolutionVersion::V2.
StateResolutionV2Rules has the following fields:
begin_iterative_auth_checks_with_empty_state_map, to determine whether to begin the first phase of iterative auth checks with an empty state map.
consider_conflicted_state_subgraph, to determine whether to include the conflicted state subgraph in the full conflicted state.
Bug fix:
Set the disposition of RoomVersionRules::MSC2870 as unstable.
Improvements:
Implement the Zeroize trait for the Base64 type.
ProtocolInstance has an instance_id field, due to a clarification in the spec.
The unstable-unspecified cargo feature was removed.
Add AnyKeyName as a helper type to use KeyId APIs without validating the key name.
Add IdentityServerBase64PublicKey as a helper type to decode identity server public keys encoded using standard or URL-safe base64.
RoomVersion was imported from ruma-state-res and renamed to RoomVersionRules, along with the following changes:
RoomVersionRules::new() was removed and replaced by RoomVersionId::rules().
The RoomDisposition enum was renamed to RoomVersionDisposition.
The event_format field was renamed to event_id_format and the EventFormat enum was renamed to EventIdFormat.
The tweaks in the authorization rules were extracted into the AuthorizationRules struct, which is available in the authorization field of RoomVersionRules.
The special_case_aliases_auth field was renamed to special_case_room_aliases.
The strict_canonicaljson field was renamed to strict_canonical_json.
The extra_redaction_checks field was renamed to special_case_room_redaction.
The allow_knocking field was renamed to knocking.
The restricted_join_rules field was renamed to restricted_join_rule.
RedactionRules was added under the redaction field.
SignaturesRules was added under the signatures field.
RoomVersionId has an MSC2870 variant for the org.matrix.msc2870 room version defined in MSC2870.
Add OutgoingRequest::is_supported() and VersionHistory::is_supported() to be able to know if a server advertises support for an endpoint.
Re-export ID_MAX_BYTES from ruma-identifiers-validation.
Implement From<PublicRoomsChunk> for RoomSummary.
Add content_field_redacts field to RedactionRules, which is used to determine whether the content or top-level redacts field should be used to determine what event an m.room.redaction event redacts.
Add SpaceChildOrder which allows to validate the order of an m.space.child event.
Add support for room version 12 and its unstable version org.matrix.hydra.11.
Add explicitly_privilege_room_creators and additional_room_creators to AuthorizationRules to indicate whether room creators are considered to have "infinite" power level and whether additional room creators can be specified with the content.additional_creators field of an m.room.create event respectively.
Add RoomPowerLevelsRules, to provide tweaks to how the power level of a user is determined, and add it to PushConditionPowerLevelsCtx via the rules field.
Add room_id_format to RoomVersionRules, to identify the format to use for room IDs depending on the room version.
Add RoomId::new_v2() for the new format of room IDs. RoomId::strip_sigil() allows to access the reference hash used in that format.
Add unstable support for in-app-only notifications as per MSC3768 under a new unstable-msc3768 feature.
Add room_create_event_id_as_room_id to AuthorizationRules to indicate whether the reference hash of the m.room.create event is used to construct the room ID. It has other implications, like the m.room.create event not having a room ID, and the m.room.create event not listed in the auth_events of a PDU.
Add require_room_create_room_id and allow_room_create_in_auth_events to EventFormatRules to indicate whether the room ID is required for m.room.create events and whether the event ID of the m.room.create is allowed in the auth_events, respectively.
Fix serde::default_on_error deserialization helper. It was working with serde_json::from_value but not other functions like serde_json::from_(str/slice). It now works with all 3 methods but is limited to deserializing JSON.
#461: Allow any kind of passthrough attributes on EnumDiscriminants.
Previously only list-style attributes (e.g. #[strum_discriminants(derive(...))]) were supported. Now path-only
(e.g. #[strum_discriminants(non_exhaustive)]) and name/value (e.g. #[strum_discriminants(doc = "foo")])
attributes are also supported.
#462: Add missing #[automatically_derived] to generated impls not
covered by #444.
#466: Bump MSRV to 1.71, required to keep up with updated syn and windows-sys dependencies. This is a breaking change if you're on an old version of rust.
#469: Use absolute paths in generated proc macro code to avoid
potential name conflicts.
#477: strum::ParseError now implements core::fmt::Display instead std::fmt::Display to make it #[no_std] compatible. Note the Error trait wasn't available in core until 1.81
so strum::ParseError still only implements that in std.
#476: Breaking Change - EnumString now implements From<&str>
(infallible) instead of TryFrom<&str> when the enum has a #[strum(default)] variant. This more accurately
reflects that parsing cannot fail in that case. If you need the old TryFrom behavior, you can opt back in using parse_error_ty and parse_error_fn:
#431: Fix bug where EnumString ignored the parse_err_ty
attribute when the enum had a #[strum(default)] variant.
#474: EnumDiscriminants will now copy default over from the
original enum to the Discriminant enum.
#[derive(Debug,Default,EnumDiscriminants)]#[strum_discriminants(derive(Default))]// <- Remove this in 0.28.enumMyEnum{#[default]// <- Will be the #[default] on the MyEnumDiscriminant#[strum_discriminants(default)]// <- Remove this in 0.28Variant0,Variant1{a:NonDefault},}
Added [WbgGeneric] WebIDL extended attribute for opting stable dictionary and interface
definitions into typed generics (the same signatures unstable APIs use), avoiding legacy &JsValue fallbacks. Applied to all new VideoFrame-related types. #5008
Added unchecked_optional_param_type attribute for marking exported function parameters as
optional in TypeScript (?:) and JSDoc ([paramName]) output. Mutually exclusive with unchecked_param_type. Required parameters after optional parameters are rejected at compile time. #5002
Added termination detection for panic=unwind builds. 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 a Module terminated error instead of re-entering corrupted state. #5005
When --reset-state is combined with panic=unwind builds, the Wasm instance is
automatically reset after a fatal termination, allowing subsequent calls to succeed
instead of throwing a Module terminated error. #5013
Changed
Replaced runtime 0x80000000 vtable bit-flag for closure unwind safety with a
compile-time const UNWIND_SAFE: bool generic on the invoke shim, OwnedClosure,
and BorrowedClosure. Removes OwnedClosureUnwind and deduplicates internal
closure helpers. The public API is unchanged. #5003
Removed unused IntoWasmClosureRef*::WithLifetime types, WasmClosure::to_wasm_slice, and a lifetime from IntoWasmClosureRef*; moved Static associated type into WasmClosure. #5003
Fixed
Fixed exported structs/enums/functions with the same js_name but different js_namespace values 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's UpcastFrom that allowed to extend the lifetime after the original ScopedClosure was dropped. #5006
Reduced usage of unsafe code: replaced transmute/transmute_copy with safe
alternatives for Boolean/Null/Undefined constants and ArrayTuple conversions,
unified duplicated AsRef/From impls for generic imported types, and removed the __wbindgen_object_is_undefined intrinsic in favor of a safe Rust-side equivalent. #4993
Renamed __wbindgen_object_is_null_or_undefined intrinsic to __wbindgen_is_null_or_undefined and removed the __wbindgen_object_is_undefined
intrinsic, replacing it with a safe Rust-side check. The is_null_or_undefined check
now uses safe &JsValue ABI instead of raw u32. #4994
Fixed
Fixed incorrect method naming for stable web-sys methods that reference unstable
types (e.g. texImage2D taking a VideoFrame parameter). These methods were
being named in a separate unstable expansion namespace, producing overly-short
names like tex_image_2d instead of the correct tex_image_2d_with_u32_and_u32_and_video_frame. The fix separates the signature
classification 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
Removed ImmediateClosure type introduced in 0.2.109. Stack-borrowed &dyn Fn / &mut dyn FnMut
closures are now treated as unwind safe by default (panics are caught and converted to JS exceptions
with proper unwinding). A unified ScopedClosure::immediate approach may be revisited in a future
release. #4986
Restored backwards compatibility for breaking changes introduced in 0.2.110:
re-added deprecated Promise::then2 binding, reverted Promise::all_settled
stable signature to take &JsValue instead of owned Object, and added
default type parameters (= JsValue) to ArrayIntoIter, ArrayIter, and Iter structs. #4979
Refactor new closure methods - ensures that all closure constructor functions have the variants Closure::foo(), Closure::foo_aborting() and Closure::foo_assert_unwind_safe() this then fully allows switching from the UnwindSafe bound now being applies on foo() to use one of the
alternatives, given these limitations of AssertUnwindSafe. The same applies to ImmediateClosure. In addition, mutable reentrancy guards are
added for ImmediateClosure, and it is updated to be pass-by-value as well. #4975
Fixed
Fixed a regression where Array.of1,... variants using generic 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_of methods returning the own type, to allow Array::of generic to now be on the Array<T> impl block. #4974
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 immutable Fn) and ScopedClosure::borrow_mut(&mut f) (for mutable FnMut) create borrowed closures that can capture non-'static references, ideal for immediate/synchronous JS callbacks. Closure<T> is now a type alias for ScopedClosure<'static, T>, maintaining backwards compatibility. Also added IntoWasmAbi implementation for Closure<T> enabling pass-by-value ownership transfer to JavaScript.
Added ImmediateClosure<'a, T> as a lightweight, unwind-safe replacement for &dyn FnMut in immediate/synchronous callbacks. Unlike ScopedClosure, it has
no JS call on creation, no JS call on drop, and no GC overhead—the same ABI as &dyn FnMut but with panic safety. Use ImmediateClosure::new(&f) for
immutable Fn closures (easier to satisfy unwind safety) or ImmediateClosure::new_mut(&mut f) for
mutable FnMut closures. 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 using WebAssembly.JSTag when Wasm exception handling is available. This generates
smaller and faster code by avoiding JavaScript handleError wrapper functions. #4942
Add Node.js worker_threads support for atomics builds. When targeting Node.js with atomics enabled, wasm-bindgen now generates initSync({ 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 enables
APIs like the CSS Custom Highlight API which adds the highlights attribute to the CSS namespace. #4930
Added stable ShowPopoverOptions dictionary and show_popover_with_options() method to HtmlElement, and unstable TogglePopoverOptions dictionary per the WHATWG HTML spec. #4968
Added unstable Geolocation API types per the latest W3C spec: GeolocationCoordinates, GeolocationPosition, and GeolocationPositionError. The Geolocation interface now
has both stable methods (using the old Position/PositionError types with [Throws])
and unstable methods (using the new types without [Throws]}, matching actual browser behavior). #2578
Added matrixTransform() method to DOMPointReadOnly in web-sys. #4962
Added the web and node targets to the --experimental-reset-state-function flag. #4909
Added oncancel event handler to GlobalEventHandlers (available on HtmlElement, Document, Window, etc.). #4542
Added CommandEvent and CommandEventInit from the Invoker Commands API. #4552
Added AbstractRange, StaticRange, and StaticRangeInit interfaces. #4221
Updated WebCodecs API to Working Draft 2026-01-29 and MediaRecorder API to 2025-04-17.
Added rotation and flip to VideoDecoderConfig. #4411
Added support for unstable WebIDL to override stable attribute types, allowing
corrected type signatures behind web_sys_unstable_apis. Applied to MouseEvent
coordinate attributes (clientX, clientY, screenX, screenY, offsetX, offsetY, pageX, pageY) which now return f64 instead of i32 when
unstable 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() and Performance.measure()
return PerformanceMark and PerformanceMeasure respectively (instead of undefined)
when web_sys_unstable_apis is enabled. Also added PerformanceMarkOptions, PerformanceMeasureOptions, and the detail attribute on marks/measures. #3734
Added non-standard mode option for FileSystemFileHandle.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. Sequence
arguments in unstable APIs now use typed slices (&[T]) instead of &JsValue.
Fixed inner string enum types to use JsString in generic positions, added BigInt
to 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 expanded
constructors 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 require UnwindSafe bounds on closures when building with panic=unwind. New _aborting variants (new_aborting(), once_aborting(), etc.) are provided for closures that don't need panic catching and want to avoid the UnwindSafe requirement. #4893
global does not use the unsafe-eval new Function trick anymore allowing to have CSP strict compliant packages with wasm-bindgen. #4910
eval and Function constructors are now gated behind the unsafe-eval feature. #4914
Fixed
Fixed incorrect JS export names when LLVM merges identical functions at opt-level >= 2. #4946
Fixed incorrect Closure adapter deduplication when wasm-ld's Identical Code Folding merges
invoke functions for different closure types into the same export. #4953
Fixed ReferenceError when using Rust struct names that conflict with JS builtins (e.g., Array).
The constructor now correctly uses the aliased FinalizationRegistry identifier. #4932
Fixed Element::scroll_top(), Element::scroll_left(), and HtmlElement::scroll_top()
to return f64 instead of i32 per the CSSOM View spec, behind web_sys_unstable_apis.
The stable API is unchanged for backwards compatibility. #4525
Added spec-compliant i32 parameter types for CanvasRenderingContext2d::get_image_data()
and put_image_data() (and OffscreenCanvasRenderingContext2d equivalents) behind web_sys_unstable_apis. Per the HTML spec, getImageData and `putImageDa
Configuration
📅 Schedule: 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
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: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path crates/wysiwyg/Cargo.toml --package [email protected] --precise 0.2.114
Updating crates.io index
error: failed to select a version for the requirement `wasm-bindgen = "=0.2.100"`
candidate versions found which didn't match: 0.2.114
location searched: crates.io index
required by package `web-sys v0.3.77`
... which satisfies dependency `web-sys = "^0.3.60"` (locked to 0.3.77) of package `wysiwyg v2.41.1 (/tmp/renovate/repos/github/element-hq/matrix-rich-text-editor/crates/wysiwyg)`
... which satisfies path dependency `wysiwyg` (locked to 2.41.1) of package `uniffi-wysiwyg-composer v2.41.1 (/tmp/renovate/repos/github/element-hq/matrix-rich-text-editor/bindings/wysiwyg-ffi)`
File name: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path bindings/wysiwyg-wasm/Cargo.toml --package [email protected] --precise 0.3.91
Updating crates.io index
error: failed to select a version for the requirement `js-sys = "=0.3.77"`
candidate versions found which didn't match: 0.3.91
location searched: crates.io index
required by package `web-sys v0.3.77`
... which satisfies dependency `web-sys = "^0.3.60"` (locked to 0.3.77) of package `wysiwyg v2.41.1 (/tmp/renovate/repos/github/element-hq/matrix-rich-text-editor/crates/wysiwyg)`
... which satisfies path dependency `wysiwyg` (locked to 2.41.1) of package `uniffi-wysiwyg-composer v2.41.1 (/tmp/renovate/repos/github/element-hq/matrix-rich-text-editor/bindings/wysiwyg-ffi)`
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
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:
1.0.0→1.0.40.30.0→0.39.02.0.6→2.0.70.3.77→0.3.911.21.1→1.21.40.13.0→0.13.11.11.1→1.12.30.15.0→0.17.00.12.0→0.13.00.27→0.280.27→0.28789a902→405cd66789a902→405cd66789a902→405cd662.5.4→2.5.80.2.100→0.2.1140.4.50→0.4.640.3.50→0.3.640.3.77→0.3.911.2.0→1.2.1Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
rust-lang/cfg-if (cfg-if)
v1.0.4Compare Source
cfg(true)andcfg(false)(#99)v1.0.3Compare Source
@__identityrule."v1.0.2Compare Source
@__identityrule.v1.0.1Compare Source
compiler-builtinsfromrustc-dep-of-stddependenciesservo/html5ever (html5ever)
v0.35.0: 0.35.0From this release forward,
html5ever,xml5ever,markup5ever, andmatch_tokenare now released using a synced version number. Thus this release is version0.35.0of all of these crates.Changes
web_atomsare now in sync. (#637)maccrate. (#639)TreeBuilderoption. (#631)scripting_enabledandiframe_srcdocoptions (#631)TreeSink::attach_declarative_shadow_root(#633)dtolnay/indoc (indoc)
v2.0.7Compare Source
indoc! {c"..."},indoc! {cr"..."}(#67)matklad/once_cell (once_cell)
v1.21.4Compare Source
Fix unsoundness in
OnceCell::waitunder--features=parking_lot, #295.If thread A calls
wait, while thread B callsget_or_try_init(f), and, furthermore,fpanics,the
waitincorrectly returns and thread A observes uninitialized memory.Kudos to @meng-xu-cs for a nice find!
v1.21.3Compare Source
race: #284,#285.
v1.21.2Compare Source
race: #278.raphlinus/pulldown-cmark (pulldown-cmark)
v0.13.1: 0.13.1Compare Source
Update dependencies.
Full Changelog: pulldown-cmark/pulldown-cmark@v0.13.0...v0.13.1
rust-lang/regex (regex)
v1.12.3Compare Source
===================
This release excludes some unnecessary things from the archive published to
crates.io. Specifically, fuzzing data and various shell scripts are now
excluded. If you run into problems, please file an issue.
Improvements:
Switch from a Cargo
excludelist to anincludelist, and exclude someunnecessary stuff.
v1.12.2Compare Source
===================
This release fixes a
cargo docbreakage on nightly when--cfg docsrsisenabled. This caused documentation to fail to build on docs.rs.
Bug fixes:
Switches the
doc_auto_cfgfeature todoc_cfgon nightly for docs.rs builds.v1.12.1Compare Source
===================
This release makes a bug fix in the new
regex::Captures::get_matchAPIintroduced in
1.12.0. There was an oversight with the lifetime parameterfor the
Matchreturned. This is technically a breaking change, but giventhat it was caught almost immediately and I've yanked the
1.12.0release,I think this is fine.
v1.12.0Compare Source
===================
This release contains a smattering of bug fixes, a fix for excessive memory
consumption in some cases and a new
regex::Captures::get_matchAPI.Improvements:
Add
Capture::get_matchfor returning the overall match withoutunwrap().Bug fixes:
Fixes a panic in the lazy DFA (can only occur for especially large regexes).
Fixes a memory usage regression for large regexes (introduced in
regex 1.9).Fix universal start states in sparse DFA.
Fixes a panic when deserializing a corrupted dense DFA.
Make
regex_automata::meta::Regex::findconsistently returnNonewhenWhichCaptures::Noneis used.v1.11.3Compare Source
===================
This is a small patch release with an improvement in memory usage in some
cases.
Improvements:
Improve memory usage by trimming excess memory capacity in some spots.
v1.11.2Compare Source
===================
This is a new patch release of
regexwith some minor fixes. A larger numberof typo or lint fix patches were merged. Also, we now finally recommend using
std::sync::LazyLock.Improvements:
Switch recommendation from
once_celltostd::sync::LazyLock.Add
DFA::set_prefiltertoregex-automata.Bug fixes:
Remove
stddependency fromperf-literal-multisubstringcrate feature.Clarify the meaning of
(?R)$in the documentation.Remove
fuzz/andrecord/directories from published crate on crates.io.ruma/ruma (ruma-common)
v0.17.1: ruma-common 0.17.1Compare Source
Bug fixes:
Cloneimplementation of theOwned*types generated with theIdDstmacro. It used to always create a new instance from the borrowed type instead of using theCloneimplementation of the internal type.Improvements:
AppserviceUserIdentity::maybe_add_to_uri()to add an identity assertion to anhttp::Uri. This allows to reimplement the behavior ofOutgoingRequestAppserviceExt::try_into_http_request_with_identity()outside of Ruma, if using this trait is inconvenient.MatrixVersion::V1_17.JoinRuleholds arbitrary data in its fallback variant, with can be accessed withJoinRule::data(). It also means that this type won't fail to serialize for undocumented variants anymore.v0.17.0: ruma-common 0.17.0Compare Source
Breaking changes:
PartialOrdAsRefStrderive macro intoOrdAsRefStr, so both traits are always implemented using the same logic.PartialEqAsRefStrderive macro toEqAsRefStrand make it implement bothPartialEqandEq.StringEnumderive macro also implementsOrd,PartialOrd,EqandPartialEqusing theAsRef<str>implementation of the enum.PatternedPushRule::contains_user_name(),ConditionalPushRule::contains_display_name()andConditionalPushRule::roomnotif()were removed, according to MSC4210. Their rule IDs are still available inPredefinedContentRuleIdandPredefinedOverrideRuleId, and they are still supported inPatternedPushRule::applies_to()andConditionalPushRule::applies(), for backwards-compatibility for clients.rumaandruma-eventscrate from thematrix-sdk-appservicecrate. This crate was dropped 2 years ago.Metadatawas changed from astructto atrait. It is a supertrait ofOutgoingRequestandIncomingRequest, and its fields are now associated types or constants.authenticationfield of theMetadatastruct is now an associated type namedAuthentication. TheAuthSchemeenum was changed from anenumto atrait. Its variants are now structs implementing theAuthSchemetrait. TheNonevariant was renamed toNoAuthenticationand theServerSignaturesvariant was moved to ruma-federation-api. Theaccess_tokenargument ofOutgoingRequest::try_into_http_request()is renamed toauthentication_inputand is generic over theInputassociated type of theAuthSchemetrait.historyfield of theMetadatastruct is now an associated constant namedPATH_BUILDER. The type of this constant is defined by thePathBuilderassociated type, which must implement thePathBuildertrait. Theconsideringargument ofOutgoingRequest::try_into_http_request()is renamed topath_builder_inputand is generic over theInputassociated type of thePathBuildertrait. TheInputofVersionHistorywas changed from&'_ SupportedVersionstoCow<'_, SupportedVersions>.Metadatastruct are now associated constants with the same name converted to uppercase.metadata!macro generates theMetadatatrait implementation for a type namedRequestby default. This type can be changed with an@forsetting.http_headersmodule is now behind theapicargo feature.OutgoingRequestAppserviceExt::try_into_http_request_with_user_id()is renamed totry_into_http_request_with_identity()and takes anAppserviceUserIdentityinstead of aUserId. This allows to specify a device ID, according to MSC4326.IntoHttpError::NeedsAuthenticationis a newtype variant renamed toAuthenticationthat accepts any error type.StringEnum,AsRefStrandFromStringderive macros'rename_allattribute, because they either can be replaced by the(prefix = "prefix", rule = "rule")syntax or are unused as far as we know:"PascalCase""SCREAMING-KEBAB-CASE""m.dotted.case""M_MATRIX_ERROR_CASE""m.lowercase""m.snake_case"".m.rule.snake_case""m.role.snake_case"Bug fixes:
requestandresponseattribute macros, theContent-Typeheader defaults toapplication/octet-streaminstead ofapplication/jsonif theraw_bodyattribute is set on a field.VersionHistorycontain the same number of variables. It was broken since the syntax was changed from:variableto{variable}.Improvements:
org.matrix.msc4380unstable feature support to/versions.MatrixVersion::V1_16org.matrix.hydra.11room version and the correspondingunstable-hydracargo feature. It should only have been used for development, and room version 12 should be used instead.Metadata::make_endpoint_url()is also available asVersionHistory::make_endpoint_url().PushCondition::ContainsDisplayNameis deprecated, according to MSC4210.SinglePathas aPathBuilder. It should be used for APIs that don't have a/versionsendpoint and for endpoints that can't be versioned.AuthSchemedata can be extracted from incoming HTTP requests withAuthScheme::extract_authentication().StringEnum,AsRefStrandFromStringderive macros allow to set a custom prefix alongside the rule to rename all the variants, like this:#[ruma_enum(rename_all(prefix = "m.", rule = "snake_case"))]. The previous syntax using#[ruma_enum(rename_all = "snake_case")]still works and assumes that the prefix is empty.v0.16.0: ruma-common 0.16.0Compare Source
Breaking changes:
PushCondition::applies,ConditionalPushRule::applies,AnyPushRuleRef::applies,AnyPushRule::applies,Ruleset::applies,Ruleset::get_actions,Ruleset::get_matchall became async, to allow for lazy evaluation of push rules.UserIdparsing and deserialization are now compatible with all non-compliant user IDs in the wild by default, due to a clarification in the spec.compat-user-idcargo feature was removed.UserId::validate_historical()andUserId::validate_strict()allow to check for spec compliance.(owned_)user_id!macros always validate against the strict grammar in the spec, regardless of the compat features that are enabled.(owned_)room_id!macros disallow theNULbyte, due to a clarification in the spec.(owned_)room_alias_id!macros disallow theNULbyte for the localpart, due to a clarification in the spec.MatrixVersiondoes not implementDisplayanymore as it is not correct to convertV1_0to a string. InsteadMatrixVersion::as_str()can be used that only returnsNonefor that same variant.MatrixVersion::(into/from)_partsare no longer exposed as public methods. They were usually used to sortMatrixVersions, now thePartialOrdandOrdimplementations can be used instead.ProtocolandProtocolInitare generic on the protocol instance type.AppserviceTokentoAppserviceTokenOptional, with the new variant takingAppserviceToken's place.redact*functions incanonical_jsontakeRedactionRulesinstead ofRoomVersionId. This avoids undefined behavior for unknown room versions.OutgoingRequest::try_into_http_request(),OutgoingRequestAppserviceExt::try_into_http_request_with_user_id()andMetadata::make_endpoint_url()take aSupportedVersionsinstead of a&[MatrixVersion].metadatamacro allows to specify stable and unstable feature flags for the paths inhistory.VersionHistory::new()takes a&'static [(Option<&'static str>, &'static str)]for the unstable paths and a&'static [(StablePathSelector, &'static str)]for the stable paths.VersionHistory::unstable_paths()returns animpl Iterator<Item = (Option<&'static str>, &'static str)>.VersionHistory::stable_paths()returns animpl Iterator<Item = (StablePathSelector, &'static str)>.VersionHistory::stable_endpoint_for()was renamed toversion_path().VersioningDecision'sStablevariant was renamed toVersionandUnstablewas renamed toFeature.metadatamacro has changed: the variable must now be surrounded by{}instead of being preceded by:. For example/_matrix/client/foo/{bar}. This matches the OpenAPI syntax and the new syntax supported by axum 0.8.JoinRuleand its associated types where imported fromruma-eventsinto theroommodule.space::SpaceRoomJoinRulewas removed and replaced byroom::JoinRuleSummary.directory::PublicRoomJoinRulewas moved and renamed toroom::JoinRuleKind.JoinRule::kind()andJoinRuleSummary::kind().PushConditionRoomCtxandPushConditionPowerLevelsCtxnon-exhaustive.versionsfield ofSupportedVersionsis now aBTreeSet<MatrixVersion>, to make sure that the versions are always deduplicated and sorted.NotificationPowerLevelsnow takes aNotificationPowerLevelsKeyfor thekey, an enum that accepts any string.keyfield ofPushCondition::SenderNotificationPermissionuses the same type.RoomId::new()was renamed toRoomId::new_v1(), as several formats are now supported for this type.StateResolutionVersion::V2now takesStateResolutionV2Rulesas a unit field, to specify tweaks to be used when resolving state with version 2 of the state resolution algorithm.StateResolutionVersion::v2_rules, returningNoneifstate_resis notStateResolutionVersion::V2.StateResolutionV2Ruleshas the following fields:begin_iterative_auth_checks_with_empty_state_map, to determine whether to begin the first phase of iterative auth checks with an empty state map.consider_conflicted_state_subgraph, to determine whether to include the conflicted state subgraph in the full conflicted state.Bug fix:
dispositionofRoomVersionRules::MSC2870as unstable.Improvements:
Zeroizetrait for theBase64type.ProtocolInstancehas aninstance_idfield, due to a clarification in the spec.unstable-unspecifiedcargo feature was removed.AnyKeyNameas a helper type to useKeyIdAPIs without validating the key name.IdentityServerBase64PublicKeyas a helper type to decode identity server public keys encoded using standard or URL-safe base64.RoomVersionwas imported from ruma-state-res and renamed toRoomVersionRules, along with the following changes:RoomVersionRules::new()was removed and replaced byRoomVersionId::rules().RoomDispositionenum was renamed toRoomVersionDisposition.event_formatfield was renamed toevent_id_formatand theEventFormatenum was renamed toEventIdFormat.AuthorizationRulesstruct, which is available in theauthorizationfield ofRoomVersionRules.special_case_aliases_authfield was renamed tospecial_case_room_aliases.strict_canonicaljsonfield was renamed tostrict_canonical_json.extra_redaction_checksfield was renamed tospecial_case_room_redaction.allow_knockingfield was renamed toknocking.restricted_join_rulesfield was renamed torestricted_join_rule.RedactionRuleswas added under theredactionfield.SignaturesRuleswas added under thesignaturesfield.RoomVersionIdhas anMSC2870variant for theorg.matrix.msc2870room version defined in MSC2870.OutgoingRequest::is_supported()andVersionHistory::is_supported()to be able to know if a server advertises support for an endpoint.ID_MAX_BYTESfromruma-identifiers-validation.From<PublicRoomsChunk>forRoomSummary.content_field_redactsfield toRedactionRules, which is used to determine whether thecontentor top-levelredactsfield should be used to determine what event anm.room.redactionevent redacts.SpaceChildOrderwhich allows to validate theorderof anm.space.childevent.org.matrix.hydra.11.explicitly_privilege_room_creatorsandadditional_room_creatorstoAuthorizationRulesto indicate whether room creators are considered to have "infinite" power level and whether additional room creators can be specified with thecontent.additional_creatorsfield of anm.room.createevent respectively.RoomPowerLevelsRules, to provide tweaks to how the power level of a user is determined, and add it toPushConditionPowerLevelsCtxvia therulesfield.room_id_formattoRoomVersionRules, to identify the format to use for room IDs depending on the room version.RoomId::new_v2()for the new format of room IDs.RoomId::strip_sigil()allows to access the reference hash used in that format.unstable-msc3768feature.room_create_event_id_as_room_idtoAuthorizationRulesto indicate whether the reference hash of them.room.createevent is used to construct the room ID. It has other implications, like them.room.createevent not having a room ID, and them.room.createevent not listed in theauth_eventsof a PDU.require_room_create_room_idandallow_room_create_in_auth_eventstoEventFormatRulesto indicate whether the room ID is required form.room.createevents and whether the event ID of them.room.createis allowed in theauth_events, respectively.v0.15.4: ruma-common 0.15.4Compare Source
Bug fix:
serde::default_on_errordeserialization helper. It was working withserde_json::from_valuebut not other functions likeserde_json::from_(str/slice). It now works with all 3 methods but is limited to deserializing JSON.v0.15.3: ruma-common 0.15.3Compare Source
Improvements:
RoomSummarythat represents the summary of a room's state.From<RoomSummary>forPublicRoomsChunkMatrixVersion::V1_15.PublicRoomJoinRulenow includes all possible join rule kinds, due to a clarification in Matrix 1.15.serde::default_on_error()as a helper to ignore errors during deserialization.PublicRoomJoinRuleandSpaceRoomJoinRule.FeatureFlagas an enum whose variants are the flags of features supported by Ruma.SupportedVersions, a type to parse/versionsresponses to get lists of supported versions and features.v0.15.2: ruma-common 0.15.2Compare Source
Bug fixes:
MatrixVersion::V1_0now also matches Identity Service API versions r0.2.0 to r0.3.0.RUMA_UNSTABLE_EXHAUSTIVE_TYPESenvironment variableImprovements:
MatrixVersionimplementsPartialOrdandOrd. The variants are ordered by release date, with a newer version being greater than an older version.SignaturesimplementsIntoIteratorPartialEqAsRefStr,Eq,PartialOrdAsRefStr,OrdAsRefStrforruma_common::media::Method.DeviceId::new()generates a string with 10 chars instead of 8.ignore_invalid_vec_items, to assist deserialization ofVecs, where invalid items should be ignored.MatrixVersion::V1_14.oknozor/speculoos (speculoos)
v0.13.0Compare Source
What's Changed
New Contributors
Full Changelog: oknozor/speculoos@0.12.0...0.13.0
Peternator7/strum (strum)
v0.28.0Compare Source
#461: Allow any kind of passthrough attributes on
EnumDiscriminants.#[strum_discriminants(derive(...))]) were supported. Now path-only(e.g.
#[strum_discriminants(non_exhaustive)]) and name/value (e.g.#[strum_discriminants(doc = "foo")])attributes are also supported.
#462: Add missing
#[automatically_derived]to generated impls notcovered by #444.
#466: Bump MSRV to 1.71, required to keep up with updated
synandwindows-sysdependencies. This is a breaking change if you're on an old version of rust.#469: Use absolute paths in generated proc macro code to avoid
potential name conflicts.
#465: Upgrade
phfdependency to v0.13.#473: Fix
cargo fmt/clippyissues and add GitHub Actions CI.#477:
strum::ParseErrornow implementscore::fmt::Displayinsteadstd::fmt::Displayto make it#[no_std]compatible. Note theErrortrait wasn't available in core until1.81so
strum::ParseErrorstill only implements that in std.#476: Breaking Change -
EnumStringnow implementsFrom<&str>(infallible) instead of
TryFrom<&str>when the enum has a#[strum(default)]variant. This more accuratelyreflects that parsing cannot fail in that case. If you need the old
TryFrombehavior, you can opt back in usingparse_error_tyandparse_error_fn:#431: Fix bug where
EnumStringignored theparse_err_tyattribute when the enum had a
#[strum(default)]variant.#474: EnumDiscriminants will now copy
defaultover from theoriginal enum to the Discriminant enum.
v0.27.2Compare Source
#141: Adding support for doc comments on
EnumDiscriminantsgenerated type.#435:allow discriminants on empty enum.
#443: Change enum table callbacks to FnMut.
#444: Add
#[automatically_derived]to theimpls by @dandedotdev in #444#440: Implement a
suffixattribute for serialization of enum variants.#446: Drop needless
rustversiondependency.servo/rust-url (url)
v2.5.8Compare Source
v2.5.7What's Changed
v.2.5.6
v.2.5.7
New Contributors
Full Changelog: servo/rust-url@v2.5.5...v2.5.7
v2.5.5Compare Source
What's Changed
Mimeby @mrobinson in #1047cargo clippy --fix -- -Wclippy::use_selfby @mrobinson in #1048Url::domaindocs to show that it includes subdomain by @supercoolspy in #1057New Contributors
Full Changelog: servo/rust-url@v2.5.4...v2.5.5
wasm-bindgen/wasm-bindgen (wasm-bindgen)
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,getImageDataand `putImageDaConfiguration
📅 Schedule: 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.
This PR was generated by Mend Renovate. View the repository job log.