diff --git a/src/args.rs b/src/args.rs index 1bf398b..6d89a6d 100644 --- a/src/args.rs +++ b/src/args.rs @@ -62,6 +62,12 @@ pub struct Args { /// Build for the target triple #[arg(long, value_name = "TRIPLE")] pub target: Option, + /// Directory for all generated artifacts + #[arg(long, value_name = "DIRECTORY")] + pub target_dir: Option, + /// Override a configuration value + #[arg(long, value_name = "KEY=VAL")] + pub config: Vec, /// Path to the manifest to execute #[arg(long)] pub manifest_path: Option, diff --git a/src/cargo_build.rs b/src/cargo_build.rs index b047c71..137eb23 100644 --- a/src/cargo_build.rs +++ b/src/cargo_build.rs @@ -35,6 +35,12 @@ pub fn add_cargo_options(command: &mut Command, args: &crate::Args) { if let Some(ref val) = args.target { command.arg("--target").arg(val); } + if let Some(ref val) = args.target_dir { + command.arg("--target-dir").arg(val); + } + for keyval in args.config.iter() { + command.arg("--config").arg(keyval); + } if let Some(ref val) = args.manifest_path { command.arg("--manifest-path").arg(val); }