Initial commit
This commit is contained in:
commit
1c737a8cec
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/target
|
3659
Cargo.lock
generated
Normal file
3659
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
13
Cargo.toml
Normal file
13
Cargo.toml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[package]
|
||||||
|
name = "gui-playground"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
|
||||||
|
|
||||||
|
iced = "0.3.0"
|
||||||
|
druid = "0.7.0"
|
||||||
|
|
32
src/main.rs
Normal file
32
src/main.rs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
fn main() -> Result<(), std::io::Error> {
|
||||||
|
|
||||||
|
let args: Vec<String> = std::env::args().collect();
|
||||||
|
|
||||||
|
let framework = args.get(1).expect("Specify a GUI framework to run");
|
||||||
|
match framework.as_str() {
|
||||||
|
"iced" => iced_main(),
|
||||||
|
"druid" => druid_main(),
|
||||||
|
"egui" => egui_main(),
|
||||||
|
x => {
|
||||||
|
println!(r#"You specified {}, allowed values: "iced", "druid", "egui""#, x);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fn iced_main() {
|
||||||
|
println!("Iced");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fn druid_main() {
|
||||||
|
println!("druid");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fn egui_main() {
|
||||||
|
println!("egui");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user