2024-10-01 01:29:15 -07:00

32 lines
701 B
Rust

mod iced;
use anyhow::{anyhow, Result};
fn main() -> Result<()> {
let args: Vec<String> = std::env::args().collect();
let framework = match args.get(1) {
Some(s) => s,
None => return Err(anyhow!("Specify a framework to use")),
};
match framework.as_str() {
"iced" => iced::iced_main().map_err(|err| anyhow!(err)),
"druid" => druid_main(),
"egui" => egui_main(),
other => Err(anyhow!(
r#"You specified {other}, allowed values: "iced", "egui""#
)),
}
}
fn druid_main() -> Result<()> {
println!("druid");
Ok(())
}
fn egui_main() -> Result<()> {
println!("egui - not implemented yet");
Ok(())
}