This commit is contained in:
2025-04-04 18:21:16 +02:00
parent eca7e6f552
commit c9b4010089
18 changed files with 1018 additions and 45 deletions

30
src/bin/herodo.rs Normal file
View File

@@ -0,0 +1,30 @@
//! Herodo binary entry point
//!
//! This is the main entry point for the herodo binary.
//! It parses command line arguments and calls into the implementation in the cmd module.
use clap::{App, Arg};
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Parse command line arguments
let matches = App::new("herodo")
.version("0.1.0")
.author("SAL Team")
.about("Executes Rhai scripts for SAL")
.arg(
Arg::with_name("path")
.short("p")
.long("path")
.value_name("PATH")
.help("Path to directory containing Rhai scripts")
.required(true)
.takes_value(true),
)
.get_matches();
// Get the script path from arguments
let script_path = matches.value_of("path").unwrap();
// Call the run function from the cmd module
sal::cmd::herodo::run(script_path)
}