mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-12 20:48:57 +02:00
chore: update tauri
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli-cef": "3.0.0-alpha.6",
|
||||
"@tauri-apps/cli-cef": "3.0.0-alpha.26",
|
||||
"typescript": "^6.0.0",
|
||||
"vite": "^8.0.1"
|
||||
},
|
||||
|
||||
@@ -7,7 +7,13 @@ edition = "2021"
|
||||
[dependencies]
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
tauri = { workspace = true, features = ["wry", "common-controls-v6", "x11"] }
|
||||
tauri = { workspace = true, features = ["common-controls-v6"] }
|
||||
# The webview runtime is picked by depending on its crate and handing its
|
||||
# attributes to `tauri::Builder::runtime`.
|
||||
tauri-runtime-wry = { workspace = true, optional = true, features = [
|
||||
"common-controls-v6",
|
||||
] }
|
||||
tauri-runtime-cef = { workspace = true, optional = true }
|
||||
tokio = { version = "1", features = ["net"] }
|
||||
futures-util = "0.3"
|
||||
tauri-plugin-websocket = { path = "../../../" }
|
||||
@@ -17,4 +23,7 @@ tokio-tungstenite = "0.29"
|
||||
tauri-build = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["wry"]
|
||||
wry = ["dep:tauri-runtime-wry"]
|
||||
cef = ["dep:tauri-runtime-cef"]
|
||||
prod = ["tauri/custom-protocol"]
|
||||
|
||||
@@ -33,9 +33,19 @@ async fn accept_connection(stream: TcpStream) {
|
||||
}
|
||||
}
|
||||
|
||||
// Every CEF application is also its own renderer, GPU, network and utility
|
||||
// process. This attribute runs the helper side of that and returns before the
|
||||
// Tauri application is built, for any process Chromium launched with `--type=`.
|
||||
#[cfg_attr(feature = "cef", tauri_runtime_cef::cef_entry_point)]
|
||||
fn main() {
|
||||
tauri::async_runtime::spawn(start_server());
|
||||
tauri::Builder::default()
|
||||
|
||||
#[cfg(feature = "cef")]
|
||||
let builder = tauri::Builder::default().runtime(tauri_runtime_cef::Cef::default());
|
||||
#[cfg(not(feature = "cef"))]
|
||||
let builder = tauri::Builder::default().runtime(tauri_runtime_wry::Wry::default());
|
||||
|
||||
builder
|
||||
.plugin(tauri_plugin_websocket::init())
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
|
||||
Reference in New Issue
Block a user