Add CEF runtime to Linux builds

This commit is contained in:
Gregory Schier
2026-07-02 19:48:28 -07:00
parent 5db2008fae
commit 752b0463d0
8 changed files with 919 additions and 156 deletions
+7 -1
View File
@@ -12,7 +12,13 @@ crate-type = ["staticlib", "cdylib", "lib"]
[features]
cargo-clippy = []
default = []
default = ["wry"]
cef = ["tauri/cef"]
#
# Keep the system webview runtime as the default for local development and
# non-Linux release jobs. Linux release builds opt into `cef` with
# `--no-default-features`.
wry = ["tauri/wry", "tauri/x11", "tauri/dbus"]
updater = []
license = ["yaak-license"]
+7 -1
View File
@@ -83,6 +83,11 @@ mod uri_scheme;
mod window_menu;
mod ws_ext;
#[cfg(feature = "cef")]
type TauriRuntime = tauri::Cef;
#[cfg(not(feature = "cef"))]
type TauriRuntime = tauri::Wry;
fn setup_window_menu<R: Runtime>(win: &WebviewWindow<R>) -> Result<()> {
#[allow(unused_variables)]
let menu = window_menu::app_menu(win.app_handle())?;
@@ -1632,8 +1637,9 @@ async fn cmd_check_for_updates<R: Runtime>(
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
#[cfg_attr(feature = "cef", tauri::cef_entry_point)]
pub fn run() {
let mut builder = tauri::Builder::default().plugin(
let mut builder = tauri::Builder::<TauriRuntime>::default().plugin(
Builder::default()
.targets([
Target::new(TargetKind::Stdout),
+4
View File
@@ -12,6 +12,10 @@ crate-type = ["staticlib", "cdylib", "lib"]
[build-dependencies]
tauri-build = { version = "2.6.1", features = [] }
[features]
default = ["wry"]
wry = ["tauri/wry", "tauri/x11", "tauri/dbus"]
[dependencies]
log = { workspace = true }
serde_json = { workspace = true }