This commit is contained in:
Taha Hawa 2025-04-10 12:39:16 -04:00 committed by taha
parent 5874ea3963
commit 20a8f12160
3 changed files with 42 additions and 3 deletions

14
Cargo.lock generated
View File

@ -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]]

View File

@ -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" }

View File

@ -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.
}