rip out tauri bundle (v2), swc -> esbuild, blacksmith -> warpbuild, FAST CI 🚀 (#5328)

- inline mac, windows, linux bundling in the cli
- remove tauri bundle from our dep tree
- trim down the rpm crate for fewer dependencies in tree
- migrate from blacksmith to warpbuild
- move off swc and instead use esbuild via tool
- use dev drives in windows CI
- use fork of nix action for faster caching
- test bundling in CI
- fix asset handling in linux 
- add default APPDATA location for webview2 installs for dioxus apps on windows
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2026-03-20 12:27:13 -07:00
1 parent be7296f4f0
commit b2d01e6779
83 files changed
+7756 -5403

No files matched your search

+9 -2
View File
@@ -131,9 +131,16 @@ impl Config {
self
}
/// set the directory where data will be stored in release mode.
/// Set the directory where WebView2 stores its user data (cookies, cache, IndexedDB, etc.).
///
/// > Note: This **must** be set when bundling on Windows.
/// If not set, Dioxus automatically chooses a sensible default:
/// - **Windows:** `%LOCALAPPDATA%/<exe_name>` — this avoids the WebView2 default of
/// placing data next to the executable, which fails in read-only locations like
/// `Program Files` or on certain drive types (e.g. ReFS dev drives).
/// - **macOS/Linux:** managed by WebKit automatically.
///
/// You typically only need this if you want multiple apps to share a WebView2 profile
/// or need the data in a specific location for compliance/IT policy reasons.
pub fn with_data_directory(mut self, path: impl Into<PathBuf>) -> Self {
self.data_dir = Some(path.into());
self
+1
View File
@@ -231,6 +231,7 @@ impl EditWebsocket {
let hex_encoded_server_key = encode_key_string(&current_server_location.server_key);
let mut location = None;
#[allow(clippy::result_large_err)]
let on_request = |req: &Request, res| {
// Try to parse the webview id and key from the path
let path = req.uri().path();
+1
View File
@@ -3,6 +3,7 @@
#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
#![deny(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![allow(unexpected_cfgs)]
mod android_sync_lock;
mod app;
+13 -2
View File
@@ -260,12 +260,23 @@ impl WebviewInstance {
unsafe {
let window: id = window.ns_window() as id;
#[allow(unexpected_cfgs)]
let _: () = msg_send![window, setCollectionBehavior: NSWindowCollectionBehavior::NSWindowCollectionBehaviorManaged];
}
}
let mut web_context = WebContext::new(cfg.data_dir.clone());
let mut web_context = WebContext::new(cfg.data_dir.clone().or_else(|| {
// On Windows, WebView2 defaults to storing its data next to the executable.
// This fails on certain drives (e.g. ReFS dev drives, Program Files) where the
// directory may not be writable. Fall back to %LOCALAPPDATA%/<exe_name> automatically.
if cfg!(windows) {
let exe = std::env::current_exe().ok()?;
let name = exe.file_stem()?.to_str()?;
let local_app_data = std::env::var("LOCALAPPDATA").ok()?;
Some(std::path::PathBuf::from(local_app_data).join(name))
} else {
None
}
}));
let edit_queue = shared.websocket.create_queue();
let asset_handlers = AssetHandlerRegistry::new();
let edits = WebviewEdits::new(dom.runtime(), edit_queue.clone());