feat(cli): don't require executor arg anymore

This commit is contained in:
multisn8 2024-01-18 20:35:15 +01:00
parent 3dc36dfb3e
commit 7c98b809d7
Signed by: multisamplednight
GPG key ID: C81EF9B053977241
2 changed files with 4 additions and 7 deletions

View file

@ -1,12 +1,13 @@
use std::{fs, path::PathBuf}; use std::{fs, path::PathBuf};
use clap::Parser; use clap::Parser;
use executor::Executors; use executor::RegisteredExecutor;
#[derive(Parser, Debug)] #[derive(Parser, Debug)]
pub struct Args { pub struct Args {
file: PathBuf, file: PathBuf,
primary_executor: Executors, #[clap(default_value = "debug")]
primary_executor: RegisteredExecutor,
} }
fn main() { fn main() {

View file

@ -7,13 +7,9 @@ mod value;
/// The available executors /// The available executors
/// unused in early dev. /// unused in early dev.
#[derive(Debug, Clone, Copy, clap::ValueEnum)] #[derive(Debug, Clone, Copy, clap::ValueEnum)]
pub enum Executors { pub enum RegisteredExecutor {
/// the debug executor is single threaded and really, *really* slow. And unstable. Don't use. Unless you're a dev working on this. /// the debug executor is single threaded and really, *really* slow. And unstable. Don't use. Unless you're a dev working on this.
Debug, Debug,
/// the CPU executor primarily uses the CPU. Most likely most feature complete, and the fallback.
Cpu,
/// the Vulkan executor (obviously) uses vulkan. there's a good chance this isn't implemented yet as you're reading this.
Vulkan,
} }
trait Executor { trait Executor {