use tauri::{WebviewUrl, WebviewWindowBuilder}; pub fn context() -> tauri::Context { tauri::generate_context!() } pub fn builder() -> tauri::Builder { tauri::Builder::default().setup(|app| { WebviewWindowBuilder::new(app, "launcher", WebviewUrl::App("index.html".into())) .use_https_scheme(true) .on_navigation(|url| { url.scheme() == "https" && url.host_str() == Some("tauri.localhost") && url.port().is_none() && url.username().is_empty() && url.password().is_none() && matches!(url.path(), "/" | "/index.html") }) .build()?; Ok(()) }) }