summaryrefslogtreecommitdiffstats
path: root/crates/executor/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/executor/src/main.rs')
-rw-r--r--crates/executor/src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/executor/src/main.rs b/crates/executor/src/main.rs
index 4a045be..6360e69 100644
--- a/crates/executor/src/main.rs
+++ b/crates/executor/src/main.rs
@@ -13,6 +13,11 @@ use runner::Runner;
#[derive(Parser)]
#[clap(version = clap::crate_version!())]
struct Opts {
+ /// Allow N jobs at once.
+ /// Defaults to the number of available CPUs
+ #[clap(short, long)]
+ jobs: Option<usize>,
+ /// The tasks to run
#[clap(name = "task", required = true)]
tasks: Vec<String>,
}
@@ -20,7 +25,7 @@ struct Opts {
fn main() {
let opts: Opts = Opts::parse();
- let runner = unsafe { Runner::new() }.unwrap();
+ let runner = unsafe { Runner::new(&runner::Options { jobs: opts.jobs }) }.unwrap();
let ctx = context::Context::new(recipe::read_recipes("examples").unwrap());