update tauri to cef/wry feature flag removal

This commit is contained in:
Lucas Nogueira
2026-03-11 11:36:00 -03:00
parent c6561ab6b4
commit 8cf1cb9d02
26 changed files with 146 additions and 59 deletions
+7 -3
View File
@@ -39,13 +39,14 @@ tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.5.3" }
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.3.5" }
tauri-plugin-store = { path = "../../../plugins/store", version = "2.4.2" }
tauri-plugin-upload = { path = "../../../plugins/upload", version = "2.3.0" }
tauri-runtime-wry = { workspace = true, optional = true, features = [
"macos-private-api",
] }
tauri-runtime-cef = { workspace = true, optional = true }
[dependencies.tauri]
workspace = true
features = [
"wry",
"common-controls-v6",
"x11",
"image-ico",
"image-png",
"isolation",
@@ -68,4 +69,7 @@ tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "
tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.3.2" }
[features]
default = ["wry"]
wry = ["dep:tauri-runtime-wry"]
cef = ["dep:tauri-runtime-cef"]
prod = ["tauri/custom-protocol"]
+8 -3
View File
@@ -6,6 +6,11 @@ mod cmd;
#[cfg(desktop)]
mod tray;
#[cfg(feature = "cef")]
type TauriRuntime = tauri_runtime_cef::CefRuntime<tauri::EventLoopMessage>;
#[cfg(feature = "wry")]
type TauriRuntime = tauri_runtime_wry::Wry<tauri::EventLoopMessage>;
use serde::Serialize;
use tauri::{
webview::{PageLoadEvent, WebviewWindowBuilder},
@@ -17,13 +22,13 @@ struct Reply {
data: String,
}
pub type SetupHook = Box<dyn FnOnce(&mut App) -> Result<(), Box<dyn std::error::Error>> + Send>;
pub type OnEvent = Box<dyn FnMut(&AppHandle, RunEvent)>;
pub type SetupHook<R> = Box<dyn FnOnce(&mut App<R>) -> Result<(), Box<dyn std::error::Error>> + Send>;
pub type OnEvent<R> = Box<dyn FnMut(&AppHandle<R>, RunEvent)>;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
#[allow(unused_mut)]
let mut builder = tauri::Builder::default()
let mut builder = tauri::Builder::<TauriRuntime>::new()
.plugin(
tauri_plugin_log::Builder::default()
.level(log::LevelFilter::Info)