openrunner 1.0.0

A Rust library for running OpenScript
Documentation
use openrunner::{run, ScriptOptions};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    println!("Running basic script...");

    // Run a simple script using shell
    let options = ScriptOptions::new().openscript_path("/bin/sh");
    let result = run(r#"echo "Hello from OpenRunner!""#, options).await?;
    assert_eq!(result.exit_code, 0);
    assert!(result.stdout.contains("Hello from OpenRunner!"));

    println!("Script output: {}", result.stdout);

    // Run a script with arguments
    let options = ScriptOptions::new()
        .openscript_path("/bin/sh")
        .args(vec!["World".to_string()]);
    let result = run(r#"echo "Hello, $1!""#, options).await?;
    assert!(result.stdout.contains("Hello, World!"));
    println!("Script output with args: {}", result.stdout);

    println!("Basic examples completed successfully.");
    Ok(())
}