Add Cargo Arguments and Cross-Architecture Support (#1777)

* Add passthrough to cargo build

* Add platform_triple flag

* Add handling to bundle and serve commands

* Show full stacked error from Tauri in bundling

Previously only the top-level error was shown, giving only vague data
for debugging the build process

* Adjust bundle platform triple when cross compiling

* Rename --platform-triple to --target

* restore some deleted docs on CLI commands

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
This commit is contained in:
Bennett-PetzoldandEvan Almloff authored and GitHub committed 2024-01-02 15:19:29 -06:00
1 parent fd7c9e0359
commit 80a8e1f512
6 files changed
+81 -11

No files matched your search

+16
View File
@@ -211,6 +211,8 @@ pub struct CrateConfig {
pub verbose: bool,
pub custom_profile: Option<String>,
pub features: Option<Vec<String>>,
pub target: Option<String>,
pub cargo_args: Vec<String>,
}
#[derive(Debug, Clone)]
@@ -278,6 +280,8 @@ impl CrateConfig {
let verbose = false;
let custom_profile = None;
let features = None;
let target = None;
let cargo_args = vec![];
Ok(Self {
out_dir,
@@ -294,6 +298,8 @@ impl CrateConfig {
custom_profile,
features,
verbose,
target,
cargo_args,
})
}
@@ -331,6 +337,16 @@ impl CrateConfig {
self.features = Some(features);
self
}
pub fn set_target(&mut self, target: String) -> &mut Self {
self.target = Some(target);
self
}
pub fn set_cargo_args(&mut self, cargo_args: Vec<String>) -> &mut Self {
self.cargo_args = cargo_args;
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]