Compare commits

...

1 Commits

Author SHA1 Message Date
Lucas Nogueira 8cf1cb9d02 update tauri to cef/wry feature flag removal 2026-03-11 11:36:00 -03:00
26 changed files with 146 additions and 59 deletions
Generated
+39 -26
View File
@@ -235,6 +235,8 @@ dependencies = [
"tauri-plugin-updater", "tauri-plugin-updater",
"tauri-plugin-upload", "tauri-plugin-upload",
"tauri-plugin-window-state", "tauri-plugin-window-state",
"tauri-runtime-cef",
"tauri-runtime-wry",
"time", "time",
"tiny_http", "tiny_http",
] ]
@@ -248,6 +250,8 @@ dependencies = [
"tauri", "tauri",
"tauri-build 2.5.4", "tauri-build 2.5.4",
"tauri-plugin-updater", "tauri-plugin-updater",
"tauri-runtime-cef",
"tauri-runtime-wry",
"time", "time",
"tiny_http", "tiny_http",
] ]
@@ -261,6 +265,8 @@ dependencies = [
"tauri", "tauri",
"tauri-build 2.5.4", "tauri-build 2.5.4",
"tauri-plugin-updater", "tauri-plugin-updater",
"tauri-runtime-cef",
"tauri-runtime-wry",
"tiny_http", "tiny_http",
] ]
@@ -273,6 +279,8 @@ dependencies = [
"tauri", "tauri",
"tauri-build 2.5.4", "tauri-build 2.5.4",
"tauri-plugin-store", "tauri-plugin-store",
"tauri-runtime-cef",
"tauri-runtime-wry",
] ]
[[package]] [[package]]
@@ -1495,6 +1503,8 @@ dependencies = [
"tauri-plugin-deep-link", "tauri-plugin-deep-link",
"tauri-plugin-log", "tauri-plugin-log",
"tauri-plugin-single-instance", "tauri-plugin-single-instance",
"tauri-runtime-cef",
"tauri-runtime-wry",
] ]
[[package]] [[package]]
@@ -1715,9 +1725,9 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"
[[package]] [[package]]
name = "download-cef" name = "download-cef"
version = "2.3.0" version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6002a6b95f9f3bbe5693ac02a03221a8e3af6c9f5f4539f5734a8d6cde1a3616" checksum = "d7471a7d5d3bd8df1b3b75871f0317d8a6dd73270ab861cc97ae7907ee63e554"
dependencies = [ dependencies = [
"bzip2", "bzip2",
"clap", "clap",
@@ -6045,6 +6055,8 @@ dependencies = [
"tauri-build 2.5.4", "tauri-build 2.5.4",
"tauri-plugin-cli", "tauri-plugin-cli",
"tauri-plugin-single-instance", "tauri-plugin-single-instance",
"tauri-runtime-cef",
"tauri-runtime-wry",
] ]
[[package]] [[package]]
@@ -6680,8 +6692,8 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]] [[package]]
name = "tauri" name = "tauri"
version = "2.10.2" version = "2.10.3"
source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#a4ea9711569e1143896d32cf53e99fc9742a95ab" source = "git+https://github.com/tauri-apps/tauri.git?branch=refactor/runtime-feature-flag#4fce1df9269a8b4ae1a88d133c1c4e6584da2eff"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@@ -6716,19 +6728,15 @@ dependencies = [
"serialize-to-javascript", "serialize-to-javascript",
"specta", "specta",
"swift-rs", "swift-rs",
"tauri-build 2.5.5", "tauri-build 2.5.6",
"tauri-macros", "tauri-macros",
"tauri-runtime", "tauri-runtime",
"tauri-runtime-cef",
"tauri-runtime-wry",
"tauri-utils", "tauri-utils",
"thiserror 2.0.12", "thiserror 2.0.12",
"tokio", "tokio",
"tray-icon", "tray-icon",
"url", "url",
"uuid", "uuid",
"webkit2gtk",
"webview2-com",
"window-vibrancy", "window-vibrancy",
"windows 0.61.1", "windows 0.61.1",
] ]
@@ -6759,8 +6767,8 @@ dependencies = [
[[package]] [[package]]
name = "tauri-build" name = "tauri-build"
version = "2.5.5" version = "2.5.6"
source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#a4ea9711569e1143896d32cf53e99fc9742a95ab" source = "git+https://github.com/tauri-apps/tauri.git?branch=refactor/runtime-feature-flag#4fce1df9269a8b4ae1a88d133c1c4e6584da2eff"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cargo_toml", "cargo_toml",
@@ -6806,8 +6814,8 @@ dependencies = [
[[package]] [[package]]
name = "tauri-codegen" name = "tauri-codegen"
version = "2.5.4" version = "2.5.5"
source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#a4ea9711569e1143896d32cf53e99fc9742a95ab" source = "git+https://github.com/tauri-apps/tauri.git?branch=refactor/runtime-feature-flag#4fce1df9269a8b4ae1a88d133c1c4e6584da2eff"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"ico", "ico",
@@ -6831,21 +6839,21 @@ dependencies = [
[[package]] [[package]]
name = "tauri-macros" name = "tauri-macros"
version = "2.5.4" version = "2.5.5"
source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#a4ea9711569e1143896d32cf53e99fc9742a95ab" source = "git+https://github.com/tauri-apps/tauri.git?branch=refactor/runtime-feature-flag#4fce1df9269a8b4ae1a88d133c1c4e6584da2eff"
dependencies = [ dependencies = [
"heck 0.5.0", "heck 0.5.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.100", "syn 2.0.100",
"tauri-codegen 2.5.4", "tauri-codegen 2.5.5",
"tauri-utils", "tauri-utils",
] ]
[[package]] [[package]]
name = "tauri-plugin" name = "tauri-plugin"
version = "2.5.3" version = "2.5.4"
source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#a4ea9711569e1143896d32cf53e99fc9742a95ab" source = "git+https://github.com/tauri-apps/tauri.git?branch=refactor/runtime-feature-flag#4fce1df9269a8b4ae1a88d133c1c4e6584da2eff"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"glob", "glob",
@@ -7352,8 +7360,8 @@ dependencies = [
[[package]] [[package]]
name = "tauri-runtime" name = "tauri-runtime"
version = "2.10.0" version = "2.10.1"
source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#a4ea9711569e1143896d32cf53e99fc9742a95ab" source = "git+https://github.com/tauri-apps/tauri.git?branch=refactor/runtime-feature-flag#4fce1df9269a8b4ae1a88d133c1c4e6584da2eff"
dependencies = [ dependencies = [
"cookie", "cookie",
"dpi", "dpi",
@@ -7374,7 +7382,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-runtime-cef" name = "tauri-runtime-cef"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#a4ea9711569e1143896d32cf53e99fc9742a95ab" source = "git+https://github.com/tauri-apps/tauri.git?branch=refactor/runtime-feature-flag#4fce1df9269a8b4ae1a88d133c1c4e6584da2eff"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"cef", "cef",
@@ -7392,6 +7400,7 @@ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"sha2", "sha2",
"tauri",
"tauri-runtime", "tauri-runtime",
"tauri-utils", "tauri-utils",
"url", "url",
@@ -7401,8 +7410,8 @@ dependencies = [
[[package]] [[package]]
name = "tauri-runtime-wry" name = "tauri-runtime-wry"
version = "2.10.0" version = "2.10.1"
source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#a4ea9711569e1143896d32cf53e99fc9742a95ab" source = "git+https://github.com/tauri-apps/tauri.git?branch=refactor/runtime-feature-flag#4fce1df9269a8b4ae1a88d133c1c4e6584da2eff"
dependencies = [ dependencies = [
"gtk", "gtk",
"http", "http",
@@ -7410,13 +7419,15 @@ dependencies = [
"log", "log",
"objc2 0.6.3", "objc2 0.6.3",
"objc2-app-kit", "objc2-app-kit",
"objc2-foundation 0.3.0",
"objc2-web-kit", "objc2-web-kit",
"once_cell", "once_cell",
"percent-encoding", "percent-encoding",
"raw-window-handle", "raw-window-handle",
"serde",
"serde_json",
"softbuffer", "softbuffer",
"tao", "tao",
"tauri",
"tauri-runtime", "tauri-runtime",
"tauri-utils", "tauri-utils",
"url", "url",
@@ -7428,8 +7439,8 @@ dependencies = [
[[package]] [[package]]
name = "tauri-utils" name = "tauri-utils"
version = "2.8.2" version = "2.8.3"
source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#a4ea9711569e1143896d32cf53e99fc9742a95ab" source = "git+https://github.com/tauri-apps/tauri.git?branch=refactor/runtime-feature-flag#4fce1df9269a8b4ae1a88d133c1c4e6584da2eff"
dependencies = [ dependencies = [
"aes-gcm", "aes-gcm",
"anyhow", "anyhow",
@@ -8605,6 +8616,8 @@ dependencies = [
"tauri", "tauri",
"tauri-build 2.5.4", "tauri-build 2.5.4",
"tauri-plugin-websocket", "tauri-plugin-websocket",
"tauri-runtime-cef",
"tauri-runtime-wry",
"tokio", "tokio",
"tokio-tungstenite", "tokio-tungstenite",
] ]
+6 -3
View File
@@ -13,6 +13,8 @@ serde = { version = "1", features = ["derive"] }
tracing = "0.1" tracing = "0.1"
log = "0.4" log = "0.4"
tauri = { version = "2.10", default-features = false } tauri = { version = "2.10", default-features = false }
tauri-runtime-wry = "2"
tauri-runtime-cef = { git = "https://github.com/tauri-apps/tauri.git", branch = "refactor/runtime-feature-flag" }
tauri-build = "2.5" tauri-build = "2.5"
tauri-plugin = "2.5" tauri-plugin = "2.5"
tauri-utils = "2.8" tauri-utils = "2.8"
@@ -41,6 +43,7 @@ incremental = false
opt-level = "s" opt-level = "s"
[patch.crates-io] [patch.crates-io]
tauri = { git = "https://github.com/tauri-apps/tauri.git", branch = "feat/cef" } tauri = { git = "https://github.com/tauri-apps/tauri.git", branch = "refactor/runtime-feature-flag" }
tauri-utils = { git = "https://github.com/tauri-apps/tauri.git", branch = "feat/cef" } tauri-utils = { git = "https://github.com/tauri-apps/tauri.git", branch = "refactor/runtime-feature-flag" }
tauri-plugin = { git = "https://github.com/tauri-apps/tauri.git", branch = "feat/cef" } tauri-plugin = { git = "https://github.com/tauri-apps/tauri.git", branch = "refactor/runtime-feature-flag" }
tauri-runtime-wry = { git = "https://github.com/tauri-apps/tauri.git", branch = "refactor/runtime-feature-flag" }
+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-shell = { path = "../../../plugins/shell", version = "2.3.5" }
tauri-plugin-store = { path = "../../../plugins/store", version = "2.4.2" } tauri-plugin-store = { path = "../../../plugins/store", version = "2.4.2" }
tauri-plugin-upload = { path = "../../../plugins/upload", version = "2.3.0" } 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] [dependencies.tauri]
workspace = true workspace = true
features = [ features = [
"wry",
"common-controls-v6",
"x11",
"image-ico", "image-ico",
"image-png", "image-png",
"isolation", "isolation",
@@ -68,4 +69,7 @@ tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "
tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.3.2" } tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.3.2" }
[features] [features]
default = ["wry"]
wry = ["dep:tauri-runtime-wry"]
cef = ["dep:tauri-runtime-cef"]
prod = ["tauri/custom-protocol"] prod = ["tauri/custom-protocol"]
+8 -3
View File
@@ -6,6 +6,11 @@ mod cmd;
#[cfg(desktop)] #[cfg(desktop)]
mod tray; 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 serde::Serialize;
use tauri::{ use tauri::{
webview::{PageLoadEvent, WebviewWindowBuilder}, webview::{PageLoadEvent, WebviewWindowBuilder},
@@ -17,13 +22,13 @@ struct Reply {
data: String, data: String,
} }
pub type SetupHook = Box<dyn FnOnce(&mut App) -> Result<(), Box<dyn std::error::Error>> + Send>; pub type SetupHook<R> = Box<dyn FnOnce(&mut App<R>) -> Result<(), Box<dyn std::error::Error>> + Send>;
pub type OnEvent = Box<dyn FnMut(&AppHandle, RunEvent)>; pub type OnEvent<R> = Box<dyn FnMut(&AppHandle<R>, RunEvent)>;
#[cfg_attr(mobile, tauri::mobile_entry_point)] #[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() { pub fn run() {
#[allow(unused_mut)] #[allow(unused_mut)]
let mut builder = tauri::Builder::default() let mut builder = tauri::Builder::<TauriRuntime>::new()
.plugin( .plugin(
tauri_plugin_log::Builder::default() tauri_plugin_log::Builder::default()
.level(log::LevelFilter::Info) .level(log::LevelFilter::Info)
+1 -1
View File
@@ -31,4 +31,4 @@ log = { workspace = true }
thiserror = { workspace = true } thiserror = { workspace = true }
[target.'cfg(target_os = "ios")'.dependencies] [target.'cfg(target_os = "ios")'.dependencies]
tauri = { workspace = true, features = ["wry"] } tauri = { workspace = true }
+1 -1
View File
@@ -32,7 +32,7 @@ log = { workspace = true }
thiserror = { workspace = true } thiserror = { workspace = true }
[target.'cfg(target_os = "ios")'.dependencies] [target.'cfg(target_os = "ios")'.dependencies]
tauri = { workspace = true, features = ["wry"] } tauri = { workspace = true }
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] [target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
arboard = { version = "3", features = ["wayland-data-control"] } arboard = { version = "3", features = ["wayland-data-control"] }
@@ -19,7 +19,9 @@ tauri-build = { workspace = true }
[dependencies] [dependencies]
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
tauri = { workspace = true, features = ["wry", "common-controls-v6", "x11"] } tauri = { workspace = true }
tauri-runtime-wry = { workspace = true, optional = true }
tauri-runtime-cef = { workspace = true, optional = true }
tauri-plugin-deep-link = { path = "../../../" } tauri-plugin-deep-link = { path = "../../../" }
tauri-plugin-log = { path = "../../../../log" } tauri-plugin-log = { path = "../../../../log" }
tauri-plugin-single-instance = { path = "../../../../single-instance", features = [ tauri-plugin-single-instance = { path = "../../../../single-instance", features = [
@@ -28,6 +30,9 @@ tauri-plugin-single-instance = { path = "../../../../single-instance", features
log = "0.4" log = "0.4"
[features] [features]
default = ["wry"]
wry = ["dep:tauri-runtime-wry"]
cef = ["dep:tauri-runtime-cef"]
# this feature is used for production builds or when `devUrl` points to the filesystem and the built-in dev server is disabled. # this feature is used for production builds or when `devUrl` points to the filesystem and the built-in dev server is disabled.
# If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes. # If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes.
# DO NOT REMOVE!! # DO NOT REMOVE!!
@@ -2,6 +2,11 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
#[cfg(feature = "cef")]
type TauriRuntime = tauri_runtime_cef::CefRuntime<tauri::EventLoopMessage>;
#[cfg(feature = "wry")]
type TauriRuntime = tauri_runtime_wry::Wry<tauri::EventLoopMessage>;
use tauri_plugin_deep_link::DeepLinkExt; use tauri_plugin_deep_link::DeepLinkExt;
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command // Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
@@ -13,7 +18,7 @@ fn greet(name: &str) -> String {
#[cfg_attr(mobile, tauri::mobile_entry_point)] #[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() { pub fn run() {
#[allow(unused_mut)] #[allow(unused_mut)]
let mut builder = tauri::Builder::default(); let mut builder = tauri::Builder::<TauriRuntime>::new();
#[cfg(desktop)] #[cfg(desktop)]
{ {
+2 -2
View File
@@ -28,7 +28,7 @@ ios = { level = "partial", notes = "Does not support folder picker" }
tauri-plugin = { workspace = true, features = ["build"] } tauri-plugin = { workspace = true, features = ["build"] }
[dev-dependencies] [dev-dependencies]
tauri = { workspace = true, features = ["wry"] } tauri = { workspace = true }
[dependencies] [dependencies]
serde = { workspace = true } serde = { workspace = true }
@@ -40,7 +40,7 @@ url = { workspace = true }
tauri-plugin-fs = { path = "../fs", version = "2.4.5" } tauri-plugin-fs = { path = "../fs", version = "2.4.5" }
[target.'cfg(target_os = "ios")'.dependencies] [target.'cfg(target_os = "ios")'.dependencies]
tauri = { workspace = true, features = ["wry"] } tauri = { workspace = true }
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] [target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
rfd = { version = "0.16", default-features = false, features = [ rfd = { version = "0.16", default-features = false, features = [
+1 -1
View File
@@ -30,7 +30,7 @@ thiserror = { workspace = true }
specta = { workspace = true, optional = true } specta = { workspace = true, optional = true }
[target.'cfg(target_os = "ios")'.dependencies] [target.'cfg(target_os = "ios")'.dependencies]
tauri = { workspace = true, features = ["wry"] } tauri = { workspace = true }
[features] [features]
specta = ["dep:specta", "tauri/specta"] specta = ["dep:specta", "tauri/specta"]
+1 -1
View File
@@ -30,7 +30,7 @@ thiserror = { workspace = true }
specta = { workspace = true, optional = true } specta = { workspace = true, optional = true }
[target.'cfg(target_os = "ios")'.dependencies] [target.'cfg(target_os = "ios")'.dependencies]
tauri = { workspace = true, features = ["wry"] } tauri = { workspace = true }
[features] [features]
specta = ["dep:specta", "tauri/specta"] specta = ["dep:specta", "tauri/specta"]
+1 -1
View File
@@ -34,7 +34,7 @@ url = { version = "2", features = ["serde"] }
serde_repr = "0.1" serde_repr = "0.1"
[target.'cfg(target_os = "ios")'.dependencies] [target.'cfg(target_os = "ios")'.dependencies]
tauri = { workspace = true, features = ["wry"] } tauri = { workspace = true }
[target."cfg(windows)".dependencies] [target."cfg(windows)".dependencies]
win7-notifications = { version = "0.4.5", optional = true } win7-notifications = { version = "0.4.5", optional = true }
+1 -1
View File
@@ -58,4 +58,4 @@ default-features = false
features = ["std", "NSURL", "NSArray", "NSString"] features = ["std", "NSURL", "NSArray", "NSString"]
[target.'cfg(target_os = "ios")'.dependencies] [target.'cfg(target_os = "ios")'.dependencies]
tauri = { workspace = true, features = ["wry"] } tauri = { workspace = true }
+1 -1
View File
@@ -35,4 +35,4 @@ encoding_rs = "0.8"
os_pipe = "1" os_pipe = "1"
[target.'cfg(target_os = "ios")'.dependencies] [target.'cfg(target_os = "ios")'.dependencies]
tauri = { workspace = true, features = ["wry"] } tauri = { workspace = true }
@@ -10,7 +10,9 @@ rust-version = "1.77.2"
[dependencies] [dependencies]
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
tauri = { workspace = true, features = ["wry", "common-controls-v6", "x11"] } tauri = { workspace = true }
tauri-runtime-wry = { workspace = true, optional = true }
tauri-runtime-cef = { workspace = true, optional = true }
tauri-plugin-single-instance = { path = "../../../" } tauri-plugin-single-instance = { path = "../../../" }
tauri-plugin-cli = { path = "../../../../cli" } tauri-plugin-cli = { path = "../../../../cli" }
@@ -18,4 +20,7 @@ tauri-plugin-cli = { path = "../../../../cli" }
tauri-build = { workspace = true } tauri-build = { workspace = true }
[features] [features]
default = ["wry"]
wry = ["dep:tauri-runtime-wry"]
cef = ["dep:tauri-runtime-cef"]
prod = ["tauri/custom-protocol"] prod = ["tauri/custom-protocol"]
@@ -7,8 +7,13 @@
windows_subsystem = "windows" windows_subsystem = "windows"
)] )]
#[cfg(feature = "cef")]
type TauriRuntime = tauri_runtime_cef::CefRuntime<tauri::EventLoopMessage>;
#[cfg(feature = "wry")]
type TauriRuntime = tauri_runtime_wry::Wry<tauri::EventLoopMessage>;
fn main() { fn main() {
tauri::Builder::default() tauri::Builder::<TauriRuntime>::new()
.plugin( .plugin(
tauri_plugin_single_instance::Builder::new() tauri_plugin_single_instance::Builder::new()
.callback(move |app, argv, cwd| { .callback(move |app, argv, cwd| {
+2 -2
View File
@@ -29,7 +29,7 @@ dunce = { workspace = true }
tokio = { version = "1", features = ["sync", "time", "macros"] } tokio = { version = "1", features = ["sync", "time", "macros"] }
[target.'cfg(target_os = "ios")'.dependencies] [target.'cfg(target_os = "ios")'.dependencies]
tauri = { workspace = true, features = ["wry"] } tauri = { workspace = true }
[dev-dependencies] [dev-dependencies]
tauri = { workspace = true, features = ["wry"] } tauri = { workspace = true }
@@ -13,12 +13,17 @@ edition = "2021"
tauri-build = { workspace = true } tauri-build = { workspace = true }
[dependencies] [dependencies]
tauri = { workspace = true, features = ["wry", "common-controls-v6", "x11"] } tauri = { workspace = true }
tauri-runtime-wry = { workspace = true, optional = true }
tauri-runtime-cef = { workspace = true, optional = true }
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
tauri-plugin-store = { path = "../../../" } tauri-plugin-store = { path = "../../../" }
[features] [features]
default = ["wry"]
wry = ["dep:tauri-runtime-wry"]
cef = ["dep:tauri-runtime-cef"]
# this feature is used for production builds or when `devPath` points to the filesystem # this feature is used for production builds or when `devPath` points to the filesystem
# DO NOT REMOVE!! # DO NOT REMOVE!!
prod = ["tauri/custom-protocol"] prod = ["tauri/custom-protocol"]
@@ -5,6 +5,11 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!! // Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
#[cfg(feature = "cef")]
type TauriRuntime = tauri_runtime_cef::CefRuntime<tauri::EventLoopMessage>;
#[cfg(feature = "wry")]
type TauriRuntime = tauri_runtime_wry::Wry<tauri::EventLoopMessage>;
use serde_json::json; use serde_json::json;
use tauri::Listener; use tauri::Listener;
use tauri_plugin_store::StoreExt; use tauri_plugin_store::StoreExt;
@@ -13,7 +18,7 @@ mod app;
use app::settings::AppSettings; use app::settings::AppSettings;
fn main() { fn main() {
tauri::Builder::default() tauri::Builder::<TauriRuntime>::new()
.plugin(tauri_plugin_store::Builder::new().build()) .plugin(tauri_plugin_store::Builder::new().build())
.setup(|app| { .setup(|app| {
// Init store and load it from disk // Init store and load it from disk
+6 -1
View File
@@ -7,7 +7,9 @@ edition = { workspace = true }
tauri-build = { workspace = true } tauri-build = { workspace = true }
[dependencies] [dependencies]
tauri = { workspace = true, features = ["wry", "common-controls-v6", "x11"] } tauri = { workspace = true }
tauri-runtime-wry = { workspace = true, optional = true }
tauri-runtime-cef = { workspace = true, optional = true }
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
tauri-plugin-updater = { path = "../.." } tauri-plugin-updater = { path = "../.." }
@@ -15,4 +17,7 @@ tiny_http = "0.12"
time = { version = "0.3", features = ["formatting"] } time = { version = "0.3", features = ["formatting"] }
[features] [features]
default = ["wry"]
wry = ["dep:tauri-runtime-wry"]
cef = ["dep:tauri-runtime-cef"]
prod = ["tauri/custom-protocol"] prod = ["tauri/custom-protocol"]
@@ -4,13 +4,18 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
#[cfg(feature = "cef")]
type TauriRuntime = tauri_runtime_cef::CefRuntime<tauri::EventLoopMessage>;
#[cfg(feature = "wry")]
type TauriRuntime = tauri_runtime_wry::Wry<tauri::EventLoopMessage>;
use tauri_plugin_updater::UpdaterExt; use tauri_plugin_updater::UpdaterExt;
fn main() { fn main() {
#[allow(unused_mut)] #[allow(unused_mut)]
let mut context = tauri::generate_context!(); let mut context = tauri::generate_context!();
tauri::Builder::default() tauri::Builder::<TauriRuntime>::new()
.plugin(tauri_plugin_updater::Builder::new().build()) .plugin(tauri_plugin_updater::Builder::new().build())
.setup(|app| { .setup(|app| {
let handle = app.handle().clone(); let handle = app.handle().clone();
@@ -7,7 +7,7 @@ edition = { workspace = true }
tauri-build = { workspace = true } tauri-build = { workspace = true }
[dependencies] [dependencies]
tauri = { workspace = true, features = ["wry", "common-controls-v6", "x11"] } tauri = { workspace = true }
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
tauri-plugin-updater = { path = "../.." } tauri-plugin-updater = { path = "../.." }
@@ -7,8 +7,15 @@ edition = { workspace = true }
tauri-build = { workspace = true } tauri-build = { workspace = true }
[dependencies] [dependencies]
tauri = { workspace = true, features = ["wry", "common-controls-v6", "x11"] } tauri = { workspace = true }
tauri-runtime-wry = { workspace = true, optional = true }
tauri-runtime-cef = { workspace = true, optional = true }
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
tauri-plugin-updater = { path = "../../.." } tauri-plugin-updater = { path = "../../.." }
tiny_http = "0.12" tiny_http = "0.12"
[features]
default = ["wry"]
wry = ["dep:tauri-runtime-wry"]
cef = ["dep:tauri-runtime-cef"]
@@ -4,13 +4,18 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
#[cfg(feature = "cef")]
type TauriRuntime = tauri_runtime_cef::CefRuntime<tauri::EventLoopMessage>;
#[cfg(feature = "wry")]
type TauriRuntime = tauri_runtime_wry::Wry<tauri::EventLoopMessage>;
use tauri_plugin_updater::UpdaterExt; use tauri_plugin_updater::UpdaterExt;
fn main() { fn main() {
#[allow(unused_mut)] #[allow(unused_mut)]
let mut context = tauri::generate_context!(); let mut context = tauri::generate_context!();
tauri::Builder::default() tauri::Builder::<TauriRuntime>::new()
.plugin(tauri_plugin_updater::Builder::new().build()) .plugin(tauri_plugin_updater::Builder::new().build())
.setup(|app| { .setup(|app| {
println!("version={}", app.package_info().version); println!("version={}", app.package_info().version);
@@ -7,7 +7,9 @@ edition = "2021"
[dependencies] [dependencies]
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
tauri = { workspace = true, features = ["wry", "common-controls-v6", "x11"] } tauri = { workspace = true }
tauri-runtime-wry = { workspace = true, optional = true }
tauri-runtime-cef = { workspace = true, optional = true }
tokio = { version = "1", features = ["net"] } tokio = { version = "1", features = ["net"] }
futures-util = "0.3" futures-util = "0.3"
tauri-plugin-websocket = { path = "../../../" } tauri-plugin-websocket = { path = "../../../" }
@@ -17,4 +19,7 @@ tokio-tungstenite = "0.28"
tauri-build = { workspace = true } tauri-build = { workspace = true }
[features] [features]
default = ["wry"]
wry = ["dep:tauri-runtime-wry"]
cef = ["dep:tauri-runtime-cef"]
prod = ["tauri/custom-protocol"] prod = ["tauri/custom-protocol"]
@@ -7,6 +7,11 @@
windows_subsystem = "windows" windows_subsystem = "windows"
)] )]
#[cfg(feature = "cef")]
type TauriRuntime = tauri_runtime_cef::CefRuntime<tauri::EventLoopMessage>;
#[cfg(feature = "wry")]
type TauriRuntime = tauri_runtime_wry::Wry<tauri::EventLoopMessage>;
use futures_util::StreamExt; use futures_util::StreamExt;
use tokio::net::{TcpListener, TcpStream}; use tokio::net::{TcpListener, TcpStream};
@@ -35,7 +40,7 @@ async fn accept_connection(stream: TcpStream) {
fn main() { fn main() {
tauri::async_runtime::spawn(start_server()); tauri::async_runtime::spawn(start_server());
tauri::Builder::default() tauri::Builder::<TauriRuntime>::new()
.plugin(tauri_plugin_websocket::init()) .plugin(tauri_plugin_websocket::init())
.run(tauri::generate_context!()) .run(tauri::generate_context!())
.expect("error while running tauri application"); .expect("error while running tauri application");