Skip to content

Conversation

lucasfernog
Copy link
Member

No description provided.

@lucasfernog lucasfernog requested a review from a team as a code owner October 12, 2025 21:52
@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Oct 12, 2025
Copy link
Contributor

github-actions bot commented Oct 12, 2025

Package Changes Through c1969e6

There are 10 changes which include @tauri-apps/api with minor, tauri-cli with minor, tauri-utils with minor, tauri-runtime-wry with minor, tauri-runtime with minor, tauri with minor, tauri-bundler with minor, @tauri-apps/cli with minor, tauri-codegen with patch, tauri-macros with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.8.0 2.9.0
tauri-utils 2.7.0 2.8.0
tauri-bundler 2.6.1 2.7.0
tauri-runtime 2.8.0 2.9.0
tauri-runtime-wry 2.8.1 2.9.0
tauri-codegen 2.4.0 2.4.1
tauri-macros 2.4.0 2.4.1
tauri-plugin 2.4.0 2.4.1
tauri-build 2.4.1 2.4.2
tauri 2.8.5 2.9.0
@tauri-apps/cli 2.8.4 2.9.0
tauri-cli 2.8.4 2.9.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@Legend-Master
Copy link
Contributor

Legend-Master commented Oct 13, 2025

I would assume that this will force the urlpattern > regex dependency (increases the binary size by quite a bit) even for people who's not using this feature? (previously it's only the case if you use a remote URL at least from my own experience, rust's dead code elimination will remove it if you're not using it)

Is it possible that we switch to something like glob here, like we did for the opener plugin?

@lucasfernog
Copy link
Member Author

is urlpattern currently only enabled when you have remote URLs in the capability files? Rust optimizes that away right?

if so then we should optimize it indeed

@Legend-Master
Copy link
Contributor

Legend-Master commented Oct 14, 2025

From testing this out, it seems to be the case, it's wild that the rust compiler is this smart to remove it to be honest, and with this PR, the file size remains the same if I use remove unused commands and don't include "core:webview:allow-create-webview-window", then the moment I do, the file size increases by ~1MB

)
.window_features(features)
.on_document_title_changed(|window, title| {
window.set_title(&title).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't unwrap here 🙃

Comment on lines +794 to +796
OnNewWindow::AllowTauriWindow { urls: None } => {
tauri_runtime::webview::NewWindowResponse::Allow
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this mean creating a tauri window like the match above? (OnNewWindow::AllowTauriWindow { urls: Some(urls) })

}
#[cfg(desktop)]
NewWindowResponse::Create { window } => {
tauri_runtime::webview::NewWindowResponse::Create {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's just me, but I still don't quite understand what does Create do in wry, I tried to look at the docs but I still don't really get it, and trying to call this in the simple example in wry but this seems to just freeze the entire app

    .with_new_window_req_handler(move |url, features| {
      println!("new window req: {url} {features:?}");
      wry::NewWindowResponse::Create {
        webview: features.opener.webview,
      }
    });

//! - **macos-proxy**: Adds support for [`WebviewBuilder::proxy_url`] on macOS. Requires macOS 14+.
//! - **specta**: Add support for [`specta::specta`](https://docs.rs/specta/%5E2.0.0-rc.9/specta/attr.specta.html) with Tauri arguments such as [`State`](crate::State), [`Window`](crate::Window) and [`AppHandle`](crate::AppHandle)
//! - **dynamic-acl** *(enabled by default)*: Enables you to add ACLs at runtime, notably it enables the [`Manager::add_capability`] function.
//! - **url-pattern**: Enables using the [URLPattern] spec for URL scopes on JavaScript APIs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need the link for this to work

Suggested change
//! - **url-pattern**: Enables using the [URLPattern] spec for URL scopes on JavaScript APIs.
//! - **url-pattern**: Enables using the [`URLPattern`](https://developer.mozilla.org/en-US/docs/Web/API/URLPattern) spec for URL scopes on JavaScript APIs.

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

Labels

None yet

Projects

Status: 📬Proposal

Development

Successfully merging this pull request may close these issues.

2 participants