use blarg::derive::*; use blarg::{Collection, CommandLineParser, Nargs, Optional, Parameter, Switch}; fn main() { let args = Args::blarg_parse(); if args.list { for g in strategy_list::STRATEGIES { println!("{g}"); } } else if !args.generators.is_empty() { let n = args.number.unwrap_or(10); for g in args.generators { for _ in 0..n { strategy_list::sample(&g); } } } } #[derive(Default, Debug, BlargParser)] struct Args { #[blarg(short = 'l', help = "List all generators.")] pub list: bool, #[blarg(option, short = 'n', help = "Number of samples.")] pub number: Option, #[blarg(argument, collection = Nargs::Any)] pub generators: Vec, } include!(concat!(env!("OUT_DIR"), "/strategy_list.rs"));