mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-10 16:27:05 +02:00
update tauri to cef/wry feature flag removal
This commit is contained in:
@@ -7,7 +7,9 @@ edition = "2021"
|
||||
[dependencies]
|
||||
serde = { 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"] }
|
||||
futures-util = "0.3"
|
||||
tauri-plugin-websocket = { path = "../../../" }
|
||||
@@ -17,4 +19,7 @@ tokio-tungstenite = "0.28"
|
||||
tauri-build = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["wry"]
|
||||
wry = ["dep:tauri-runtime-wry"]
|
||||
cef = ["dep:tauri-runtime-cef"]
|
||||
prod = ["tauri/custom-protocol"]
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
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 tokio::net::{TcpListener, TcpStream};
|
||||
|
||||
@@ -35,7 +40,7 @@ async fn accept_connection(stream: TcpStream) {
|
||||
|
||||
fn main() {
|
||||
tauri::async_runtime::spawn(start_server());
|
||||
tauri::Builder::default()
|
||||
tauri::Builder::<TauriRuntime>::new()
|
||||
.plugin(tauri_plugin_websocket::init())
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
|
||||
Reference in New Issue
Block a user