iowo/crates/cli/src/main.rs

22 lines
485 B
Rust
Raw Normal View History

2024-01-01 06:30:04 +00:00
use std::{fs, path::PathBuf};
use clap::Parser;
use executor::RegisteredExecutor;
2024-01-01 06:30:04 +00:00
#[derive(Parser, Debug)]
pub struct Args {
file: PathBuf,
#[clap(default_value = "debug")]
primary_executor: RegisteredExecutor,
2024-01-01 06:30:04 +00:00
}
2023-12-13 17:13:43 +00:00
fn main() {
2024-01-01 06:30:04 +00:00
let args = dbg!(Args::parse());
let f = fs::read_to_string(args.file)
.expect("reading IR failed — come back to this later handle errors properly");
let pl = ir::from_ron(&f).expect("handle me properly");
2024-01-01 06:30:04 +00:00
dbg!(pl);
2023-12-13 17:13:43 +00:00
}