From 5a9934a6f06722919de6aa7ba16a8a52fce0969d Mon Sep 17 00:00:00 2001 From: Erwan Leboucher Date: Mon, 20 Jul 2026 22:46:03 +0200 Subject: [PATCH 1/5] fix(tauri): don't leak wry into CEF builds via plugins tauri-plugin-devtools (default-features = wry) and the tauri-plugin-notifications fork (tauri defaults = wry) both forced tauri/wry -> tauri-runtime-wry -> webkit2gtk into CEF builds that should only use the CEF runtime. - devtools: default-features = false; Sable's wry feature already enables tauri/wry for wry builds - notifications: bump to fork rev 0ca647a which drops tauri defaults - remove the broken not(feature = "cef") target-cfg gate (cargo ignores feature = in cfg predicates) and the redundant direct webkit2gtk dep (pulled transitively via tauri-runtime-wry) --- .changeset/fix-cef-wry-leak.md | 5 +++++ src-tauri/Cargo.lock | 3 +-- src-tauri/Cargo.toml | 20 +++++++++++++------- 3 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 .changeset/fix-cef-wry-leak.md diff --git a/.changeset/fix-cef-wry-leak.md b/.changeset/fix-cef-wry-leak.md new file mode 100644 index 0000000000..9a647f5778 --- /dev/null +++ b/.changeset/fix-cef-wry-leak.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Stop leaking `wry`/`tauri-runtime-wry` into CEF builds via `tauri-plugin-notifications` and `tauri-plugin-devtools`. CEF builds (`--no-default-features --features cef`) no longer pull `wry` or `tauri-runtime-wry`; `webkit2gtk` still comes in via `tauri-runtime` (upstream). Also removes the broken `not(feature = "cef")` target-cfg gate that produced a cargo warning. diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 98a9129c16..1437819f0d 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -5259,7 +5259,6 @@ dependencies = [ "tokio", "tokio-util", "ts-rs", - "webkit2gtk", "windows", ] @@ -6441,7 +6440,7 @@ dependencies = [ [[package]] name = "tauri-plugin-notifications" version = "0.5.0-rc.11" -source = "git+https://github.com/SableClient/tauri-plugin-notifications.git?rev=4ea297bdeffaba6a8e2e4386a18fbd4dd59fa0f0#4ea297bdeffaba6a8e2e4386a18fbd4dd59fa0f0" +source = "git+https://github.com/SableClient/tauri-plugin-notifications.git?rev=0ca647a8d762cbba2ecfbefed7ff13565ec46229#0ca647a8d762cbba2ecfbefed7ff13565ec46229" dependencies = [ "log", "notify-rust", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index f26f453bd2..6642ff4c5c 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -52,7 +52,11 @@ tauri-plugin-clipboard-manager = "2.3.2" # Debug-only in practice: only initialized under #[cfg(debug_assertions)] in # lib.rs, so the release build never calls into it. -tauri-plugin-devtools = "2.0.0" +# default-features = false drops the plugin's `wry` feature (which enables +# `tauri/wry`); Sable's own `wry` feature already enables `tauri/wry` for wry +# builds, and CEF builds (--no-default-features --features cef) must not pull +# wry/tauri-runtime-wry/webkit2gtk. +tauri-plugin-devtools = { version = "2.0.0", default-features = false } [target.'cfg(target_os = "windows")'.dependencies] enigo = "0.5.0" @@ -67,12 +71,12 @@ windows = { version = "0.61", features = [ tauri-plugin-single-instance = { version = "2.4.3", features = ["deep-link"] } [target.'cfg(any(windows, target_os = "linux"))'.dependencies] -tauri-plugin-notifications = { git = "https://github.com/SableClient/tauri-plugin-notifications.git", rev = "4ea297bdeffaba6a8e2e4386a18fbd4dd59fa0f0" } +tauri-plugin-notifications = { git = "https://github.com/SableClient/tauri-plugin-notifications.git", rev = "0ca647a8d762cbba2ecfbefed7ff13565ec46229" } # default-features = false drops notify-rust so macOS uses the native # UNUserNotificationCenter backend (needs a signed .app to deliver). [target.'cfg(target_os = "macos")'.dependencies] -tauri-plugin-notifications = { git = "https://github.com/SableClient/tauri-plugin-notifications.git", rev = "4ea297bdeffaba6a8e2e4386a18fbd4dd59fa0f0", default-features = false } +tauri-plugin-notifications = { git = "https://github.com/SableClient/tauri-plugin-notifications.git", rev = "0ca647a8d762cbba2ecfbefed7ff13565ec46229", default-features = false } [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] tauri-plugin-updater = { version = "2", optional = true } @@ -83,9 +87,11 @@ tauri-plugin-window-state = "2.4.1" [target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies] gtk = "0.18" -# WebKitGTK is the wry runtime; not needed under CEF. -[target.'cfg(all(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"), not(feature = "cef")))'.dependencies] -webkit2gtk = "2.0" +# WebKitGTK is the wry runtime on Linux, pulled transitively via +# tauri-runtime-wry when Sable's `wry` feature is on. Not declared directly +# here because cargo cannot gate target-cfg deps on cargo features +# (`not(feature = "cef")` is silently ignored), and it's redundant with the +# transitive dep from tauri-runtime-wry. # CEF (Chromium) runtime — Linux only; other platforms use wry. # Repackage of tauri's unreleased feat/cef branch. Switch to the official @@ -96,7 +102,7 @@ cef = { version = "=148.0.0", optional = true } libloading = "0.8" [target.'cfg(any(target_os = "android", target_os = "ios"))'.dependencies] -tauri-plugin-notifications = { git = "https://github.com/SableClient/tauri-plugin-notifications.git", rev = "4ea297bdeffaba6a8e2e4386a18fbd4dd59fa0f0", features = [ +tauri-plugin-notifications = { git = "https://github.com/SableClient/tauri-plugin-notifications.git", rev = "0ca647a8d762cbba2ecfbefed7ff13565ec46229", features = [ "push-notifications", ] } tauri-plugin-edge-to-edge = { git = "https://github.com/SableClient/tauri-plugin-edge-to-edge.git", rev = "33c6116c27be28c06df5a9d02231ecc5fdeb93c5" } From 45d08e43b917279aab69a53b3bc1af1debad347c Mon Sep 17 00:00:00 2001 From: Erwan Leboucher Date: Mon, 20 Jul 2026 22:46:05 +0200 Subject: [PATCH 2/5] fix(ci): don't gate updater manifest on android build The updater-manifest job needed [setup-release, build, android], but android takes 45 min and dev pushes cancel in-progress runs. So the manifest almost never ran -- latest.json was stuck at nightly.29.1 for 4 builds. The manifest only uses desktop .sig files (produced by the build job); android produces no updater artifacts. Drop it from needs. --- .github/workflows/tauri-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tauri-build.yml b/.github/workflows/tauri-build.yml index 710b1cd97e..9dfa16cad2 100644 --- a/.github/workflows/tauri-build.yml +++ b/.github/workflows/tauri-build.yml @@ -457,7 +457,7 @@ jobs: updater-manifest: name: Publish updater manifest - needs: [setup-release, build, android] + needs: [setup-release, build] runs-on: ubuntu-latest timeout-minutes: 10 permissions: From 1055e3eb5df980858ed66580f12c3e67c0037886 Mon Sep 17 00:00:00 2001 From: Erwan Leboucher Date: Mon, 20 Jul 2026 23:22:02 +0200 Subject: [PATCH 3/5] fix: re-add webkit2gtk as optional dep gated by wry feature lib.rs uses webkit2gtk directly for WebKitGTK permission handling. The transitive dep via tauri-runtime-wry doesn't put it in scope for 'use webkit2gtk::...'. Make it optional and gate via the wry feature so CEF builds still exclude it. --- src-tauri/Cargo.toml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 6642ff4c5c..9e163155bc 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -86,12 +86,9 @@ tauri-plugin-window-state = "2.4.1" [target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies] gtk = "0.18" - -# WebKitGTK is the wry runtime on Linux, pulled transitively via -# tauri-runtime-wry when Sable's `wry` feature is on. Not declared directly -# here because cargo cannot gate target-cfg deps on cargo features -# (`not(feature = "cef")` is silently ignored), and it's redundant with the -# transitive dep from tauri-runtime-wry. +# Used directly in lib.rs for WebKitGTK permission handling (wry only). +# Optional + gated via the `wry` feature so CEF builds don't pull it. +webkit2gtk = { version = "2.0", optional = true } # CEF (Chromium) runtime — Linux only; other platforms use wry. # Repackage of tauri's unreleased feat/cef branch. Switch to the official @@ -117,7 +114,7 @@ jni = "0.21" [features] default = ["wry", "updater"] custom-protocol = ["tauri/custom-protocol"] -wry = ["tauri/wry"] +wry = ["tauri/wry", "dep:webkit2gtk"] # Tauri auto-updater. Disable with --no-default-features --features wry,cef. updater = ["dep:tauri-plugin-updater"] # CEF (Chromium) runtime. Build with --no-default-features --features cef. From 01a76927855d786781dd6563b9766c1774edabd2 Mon Sep 17 00:00:00 2001 From: Erwan Leboucher Date: Mon, 20 Jul 2026 23:29:11 +0200 Subject: [PATCH 4/5] fix: sync Cargo.lock for optional webkit2gtk dep Record webkit2gtk as a direct (optional) dependency of the sable app crate in Cargo.lock, matching the Cargo.toml change that made webkit2gtk optional and gated via the wry feature. cargo --locked was failing because the lockfile was missing this dependency entry. --- src-tauri/Cargo.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 1437819f0d..275dfffb24 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -5259,6 +5259,7 @@ dependencies = [ "tokio", "tokio-util", "ts-rs", + "webkit2gtk", "windows", ] From 1f0593c29e904923958828858f75db19ace40b21 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Tue, 21 Jul 2026 11:17:46 -0500 Subject: [PATCH 5/5] Delete .changeset/fix-cef-wry-leak.md --- .changeset/fix-cef-wry-leak.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .changeset/fix-cef-wry-leak.md diff --git a/.changeset/fix-cef-wry-leak.md b/.changeset/fix-cef-wry-leak.md deleted file mode 100644 index 9a647f5778..0000000000 --- a/.changeset/fix-cef-wry-leak.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -Stop leaking `wry`/`tauri-runtime-wry` into CEF builds via `tauri-plugin-notifications` and `tauri-plugin-devtools`. CEF builds (`--no-default-features --features cef`) no longer pull `wry` or `tauri-runtime-wry`; `webkit2gtk` still comes in via `tauri-runtime` (upstream). Also removes the broken `not(feature = "cef")` target-cfg gate that produced a cargo warning.