diff --git a/Cargo.lock b/Cargo.lock index f047624..a287efe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -378,6 +378,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944" dependencies = [ "clap_builder", + "clap_derive", ] [[package]] @@ -392,6 +393,18 @@ dependencies = [ "strsim", ] +[[package]] +name = "clap_derive" +version = "4.5.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "clap_lex" version = "0.7.4" @@ -1198,6 +1211,7 @@ name = "harmony_cli" version = "0.1.0" dependencies = [ "clap", + "harmony", ] [[package]] diff --git a/harmony_cli/Cargo.toml b/harmony_cli/Cargo.toml index a838eda..04d4b66 100644 --- a/harmony_cli/Cargo.toml +++ b/harmony_cli/Cargo.toml @@ -6,4 +6,5 @@ readme.workspace = true license.workspace = true [dependencies] -clap = "4.5.35" +clap = { version = "4.5.35", features = ["derive"] } +harmony = { path = "../harmony" } diff --git a/harmony_cli/src/main.rs b/harmony_cli/src/main.rs index e7a11a9..3da1986 100644 --- a/harmony_cli/src/main.rs +++ b/harmony_cli/src/main.rs @@ -1,3 +1,27 @@ -fn main() { - println!("Hello, world!"); +use clap::Parser; +use harmony; + +#[derive(Parser, Debug)] +#[command(version, about, long_about = None)] +struct Args { + /// Name of score to run + #[arg(short, long)] + run: String, + + /// Run interactive or not + #[arg(short, long, default_value_t = false)] + interactive: bool, + + /// Run all or first + #[arg(short, long, default_value_t = false)] + all: bool, + + /// Run nth matching + #[arg(short, long, default_value_t = 1)] + number: u8, } + +#[harmony::main] +pub async fn main(maestro: harmony::maestro::Maestro) { + maestro. +} \ No newline at end of file