2024-01-01 06:30:04 +00:00
|
|
|
use std::{fs, path::PathBuf};
|
|
|
|
|
|
|
|
use clap::Parser;
|
2024-01-18 19:35:15 +00:00
|
|
|
use executor::RegisteredExecutor;
|
2024-01-01 06:30:04 +00:00
|
|
|
|
|
|
|
#[derive(Parser, Debug)]
|
|
|
|
pub struct Args {
|
|
|
|
file: PathBuf,
|
2024-01-18 19:35:15 +00:00
|
|
|
#[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());
|
|
|
|
|
2024-01-11 10:39:59 +00:00
|
|
|
let f = fs::read_to_string(args.file)
|
|
|
|
.expect("reading IR failed — come back to this later handle errors properly");
|
2024-01-12 16:23:17 +00:00
|
|
|
let pl = ir::from_ron(&f).expect("handle me properly");
|
2024-01-01 06:30:04 +00:00
|
|
|
|
2024-01-19 01:01:30 +00:00
|
|
|
dbg!(pl.topological_sort());
|
2023-12-13 17:13:43 +00:00
|
|
|
}
|