iowo/crates/cli/src/main.rs

21 lines
504 B
Rust

use std::{fs, path::PathBuf};
use clap::Parser;
use executor::RegisteredExecutor;
#[derive(Parser, Debug)]
pub struct Args {
file: PathBuf,
#[clap(default_value = "debug")]
primary_executor: RegisteredExecutor,
}
fn main() {
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");
dbg!(pl.topological_sort());
}