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

+32 -4
View File
@@ -320,6 +320,7 @@
//! - xbuild: <https://github.com/rust-mobile/xbuild/blob/master/xbuild/src/command/build.rs>
use super::HotpatchModuleCache;
use crate::opt::{process_file_to, AssetManifest};
use crate::{
AndroidTools, AppManifest, BuildContext, BuildId, BundleFormat, DioxusConfig, Error,
LinkAction, LinkerFlavor, ObjectCache, Platform, Renderer, Result, RustcArgs, TargetArgs,
@@ -331,7 +332,6 @@ use cargo_toml::{Profile, Profiles, StripSetting};
use depinfo::RustcDepInfo;
use dioxus_cli_config::{format_base_path_meta_element, PRODUCT_NAME_ENV};
use dioxus_cli_config::{APP_TITLE_ENV, ASSET_ROOT_ENV};
use dioxus_cli_opt::{process_file_to, AssetManifest};
use itertools::Itertools;
use krates::{cm::TargetKind, NodeId};
use manganis::{AssetOptions, BundledAsset, SwiftPackageMetadata};
@@ -1306,7 +1306,12 @@ impl BuildRequest {
}
Message::CompilerArtifact(artifact) => {
units_compiled += 1;
ctx.status_build_progress(units_compiled, crate_count, artifact.target.name);
ctx.status_build_progress(
units_compiled,
crate_count,
artifact.target.name,
artifact.fresh,
);
output_location = artifact.executable.map(Into::into);
}
// todo: this can occasionally swallow errors, so we should figure out what exactly is going wrong
@@ -2280,6 +2285,7 @@ impl BuildRequest {
// Parallel Copy over the assets and keep track of progress with an atomic counter
let progress = ctx.tx.clone();
let ws_dir = self.workspace_dir();
let esbuild_path = crate::esbuild::Esbuild::path_if_installed();
// Optimizing assets is expensive and blocking, so we do it in a tokio spawn blocking task
tokio::task::spawn_blocking(move || {
@@ -2292,7 +2298,7 @@ impl BuildRequest {
"Starting asset copy {processing}/{asset_count} from {from_:?}"
);
let res = process_file_to(options, from, to);
let res = process_file_to(options, from, to, esbuild_path.as_deref());
if let Err(err) = res.as_ref() {
tracing::error!("Failed to copy asset {from:?}: {err}");
}
@@ -5524,6 +5530,25 @@ __wbg_init({{module_or_path: "/{}/{wasm_path}"}}).then((wasm) => {{
.join("app-debug.apk")
}
pub(crate) fn release_apk_path(&self) -> PathBuf {
self.root_dir()
.join("app")
.join("build")
.join("outputs")
.join("apk")
.join("release")
.join("app-release.apk")
}
pub(crate) fn android_apk_path(&self) -> PathBuf {
let assembled_release = self.release && self.config.bundle.android.is_some();
if assembled_release {
self.release_apk_path()
} else {
self.debug_apk_path()
}
}
/// We only really currently care about:
///
/// - app dir (.app, .exe, .apk, etc)
@@ -5683,6 +5708,9 @@ __wbg_init({{module_or_path: "/{}/{wasm_path}"}}).then((wasm) => {{
self.verify_toolchain_installed().await?;
// esbuild is used for JS asset processing on all platforms
let _esbuild_path = crate::esbuild::Esbuild::get_or_install().await?;
match self.bundle {
BundleFormat::Web => self.verify_web_tooling().await?,
BundleFormat::Ios => self.verify_ios_tooling().await?,
@@ -5970,7 +5998,7 @@ __wbg_init({{module_or_path: "/{}/{wasm_path}"}}).then((wasm) => {{
if let Some(name) = entry.file_name().to_str() {
if name.starts_with(&prefix) && name.ends_with(".rlib") {
let mtime = entry.metadata().ok()?.modified().ok()?;
if best.as_ref().map_or(true, |(_, t)| mtime > *t) {
if best.as_ref().is_none_or(|(_, t)| mtime > *t) {
best = Some((entry.path(), mtime));
}
}