mirror of
https://github.com/circify/circ.git
synced 2026-01-10 06:08:02 -05:00
* Configuration system. Kill DFL_T
* add circ::cfg::CircCfg that holds cfg info
* it's constructible from circ_opt::CircOpt
* implements clap::Args, so you can set it from your compiler's
CLI/envvars
* defined in external crate to keep clap out of our main build
* organized by circ module, but not feature gated
* no point: the build wouldn't meaningfully change
* includes a way to set the default field
* added circ::cfg::set and circ::cfg::cfg
* also circ::cfg::set_default and circ::cfg::set_cfg
* access a sync::once_cell, static configuration
* killed DFL_T
* workflows
* unit-tested component probably need to not read circ::cfg::cfg.
* compilers need to call circ::cfg::set or circ::cfg::set_default.
* rm dead features
14 lines
212 B
Rust
14 lines
212 B
Rust
use circ_opt::CircOpt;
|
|
use clap::Parser;
|
|
|
|
#[derive(Parser, Debug)]
|
|
struct BinaryOpt {
|
|
#[command(flatten)]
|
|
pub circ: CircOpt,
|
|
}
|
|
|
|
fn main() {
|
|
let opt = BinaryOpt::parse();
|
|
println!("{:#?}", opt);
|
|
}
|