From 081910f61c7da5df9f1f9f72ad373acbf0d47fcb Mon Sep 17 00:00:00 2001 From: FabianLars <30730186+FabianLars@users.noreply.github.com> Date: Thu, 5 Feb 2026 16:06:37 +0100 Subject: [PATCH] remove webview2-com from tauri-runtime --- Cargo.lock | 1 - crates/tauri-runtime/Cargo.toml | 3 --- crates/tauri/Cargo.toml | 4 ++-- crates/tauri/src/webview/mod.rs | 4 ++-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ab245ee3d..d0ad0c46a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9073,7 +9073,6 @@ dependencies = [ "tauri-utils", "thiserror 2.0.12", "url", - "webview2-com", "windows 0.61.1", ] diff --git a/crates/tauri-runtime/Cargo.toml b/crates/tauri-runtime/Cargo.toml index c16868b2f..6393a7744 100644 --- a/crates/tauri-runtime/Cargo.toml +++ b/crates/tauri-runtime/Cargo.toml @@ -39,9 +39,6 @@ cookie = "0.18" version = "0.61" features = ["Win32_Foundation", "Win32_System_WinRT"] -[target."cfg(windows)".dependencies] -webview2-com = "0.38" - [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] gtk = { version = "0.18", features = ["v3_24"] } diff --git a/crates/tauri/Cargo.toml b/crates/tauri/Cargo.toml index 2096c5dc2..718028007 100644 --- a/crates/tauri/Cargo.toml +++ b/crates/tauri/Cargo.toml @@ -193,8 +193,8 @@ tray-icon = ["dep:tray-icon"] tracing = ["dep:tracing", "tauri-macros/tracing", "tauri-runtime-wry?/tracing"] test = [] compression = ["tauri-macros/compression", "tauri-utils/compression"] -wry = ["webview2-com", "webkit2gtk", "tauri-runtime-wry"] -cef = ["tauri-runtime-cef"] +wry = ["dep:webview2-com", "dep:webkit2gtk", "dep:tauri-runtime-wry"] +cef = ["dep:tauri-runtime-cef"] # TODO: Remove in v3 - wry does not have this feature anymore objc-exception = [] linux-libxdo = ["tray-icon/libxdo", "muda/libxdo"] diff --git a/crates/tauri/src/webview/mod.rs b/crates/tauri/src/webview/mod.rs index 65e930a4a..5992d6fc1 100644 --- a/crates/tauri/src/webview/mod.rs +++ b/crates/tauri/src/webview/mod.rs @@ -183,7 +183,7 @@ impl PlatformWebview { } /// Returns the WebView2 controller. - #[cfg(windows)] + #[cfg(all(windows, feature = "wry"))] #[cfg_attr(docsrs, doc(cfg(windows)))] pub fn controller( &self, @@ -192,7 +192,7 @@ impl PlatformWebview { } /// Returns the WebView2 environment. - #[cfg(windows)] + #[cfg(all(windows, feature = "wry"))] #[cfg_attr(docsrs, doc(cfg(windows)))] pub fn environment( &self,