From b7e3a33dc58a37509c8a331f22cdeda3a15c2755 Mon Sep 17 00:00:00 2001 From: MultisampledNight Date: Thu, 18 Jan 2024 20:35:15 +0100 Subject: [PATCH] feat(cli): don't require executor arg anymore --- crates/cli/src/main.rs | 5 +++-- crates/executor/src/lib.rs | 6 +----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index a8c3dfd..c7b00f9 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -1,12 +1,13 @@ use std::{fs, path::PathBuf}; use clap::Parser; -use executor::Executors; +use executor::RegisteredExecutor; #[derive(Parser, Debug)] pub struct Args { file: PathBuf, - primary_executor: Executors, + #[clap(default_value = "debug")] + primary_executor: RegisteredExecutor, } fn main() { diff --git a/crates/executor/src/lib.rs b/crates/executor/src/lib.rs index 639947e..9732bb0 100644 --- a/crates/executor/src/lib.rs +++ b/crates/executor/src/lib.rs @@ -7,13 +7,9 @@ mod value; /// The available executors /// unused in early dev. #[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. 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 {