wry@0.46.0
-
8cc2a7f(#1384 by @amrbashir) This release contains quite the breaking changes, because even though wry@0.44, ignored duplicate custom protocols, On Linux when using a shared web context, the custom protocol handler can only be registered once so we are bringing the duplicate custom protocols on Linux again, Windows and macOS are not affected. If using a shared web context, make sure to register a protocol only once on Linux (other platforms should be registed multiple times), useWebContext::is_custom_protocol_registeredwith#[cfg(target_os = "linux")].We also noticed that it is hard to know which webview made a request to the custom protocol so we added a method to attach an ID to a webview, and changed relevant custom protocol APIs to take a new argument that passes the specified id back to protocol handler.
We also made a few changes to the builder, specifically
WebViewBuilder::newandWebViewBuilder::buildmethods to make them more ergonomic to work with.- Added
Error::DuplicateCustomProtocolenum variant. - Added
Error::ContextDuplicateCustomProtocolenum variant. - On Linux, return an error in
WebViewBuilder::buildif registering a custom protocol multiple times. - Added
WebContext::is_custom_protocol_registeredto check if a protocol has been regsterd for this web context. - Added
WebViewIdalias type. - Breaking Changed
WebViewAttributesto have a lifetime parameter. - Added
WebViewAttributes.idfield to specify an id for the webview. - Added
WebViewBuilder::with_idmethod to specify an id for the webview. - Added
WebViewAttributes.contextfield to specify a shared context for the webview. - Breaking Changed
WebViewAttributes.custom_protocolsfield,WebViewBuilder::with_custom_protocolmethod andWebViewBuilder::with_asynchronous_custom_protocolmethod handler function to takeWebViewIdas the first argument to check which webview made the request to the protocol. - Breaking Changed
WebViewBuilder::with_web_contextto be a static method to create a builder with a webcontext, instead of it being a setter method. It is now an alternative toWebviewBuilder::new - Added
WebViewBuilder::with_attributesto create a webview builder with provided attributes. - Breaking Changed
WebViewBuilder::newto take no arguments. - Breaking Changed
WebViewBuilder::buildmethod to take a reference to a window to create the webview in it. - Breaking Removed
WebViewBuilder::new_as_child. - Added
WebViewBuilder::build_as_childmethod, which takes a reference to a window to create the webview in it. - Breaking Removed
WebViewBuilderExtUnix::new_gtk. - Added
WebViewBuilderExtUnix::build_gtk.
- Added
-
b01eac3(#1386 by @lucasfernog) Use unescaped Android package identifier for the proguard rules.
© 2025 Tauri Contributors. CC-BY / MIT