openrunner-rs 1.0.0

A Rust library for running OpenScript
Documentation
//! # OpenRunner
//!
//! A Rust library for running OpenScript code with fine-grained control over execution,
//! I/O, environment, and process lifecycle.
//!
//! ## Features
//!
//! - Run OpenScript code from Rust (string or file)
//! - Full async support with tokio
//! - Fine-grained control over I/O, environment, working directory, timeout, and more
//! - Spawn OpenScript processes for long-running jobs
//! - Convenience macros for quick scripting
//! - Designed to integrate seamlessly with OpenScript workflows
//!
//! ## Quick Start
//!
//! ```rust
//! use openrunner_rs::{run, ScriptOptions};
//!
//! # #[tokio::main]
//! # async fn main() -> openrunner_rs::Result<()> {
//! let options = ScriptOptions::new().openscript_path("/bin/sh");
//! let result = run(r#"echo "Hello from OpenRunner!""#, options).await?;
//! println!("Output: {}", result.stdout);
//! # Ok(())
//! # }
//! ```
//!
//! ## Advanced Usage
//!
//! ```rust
//! use openrunner_rs::{run, ScriptOptions};
//! use std::time::Duration;
//!
//! # #[tokio::main]
//! # async fn main() -> openrunner_rs::Result<()> {
//! let options = ScriptOptions::new()
//!     .openscript_path("/bin/sh")
//!     .timeout(Duration::from_secs(30))
//!     .env("MY_VAR", "custom_value")
//!     .args(vec!["arg1".to_string(), "arg2".to_string()]);
//!     
//! let result = run("echo $MY_VAR $1 $2", options).await?;
//! println!("Result: {}", result.stdout);
//! # Ok(())
//! # }
//! ```

pub mod error;
pub mod macros;
pub mod runner;
pub mod types;

pub use error::{Error, Result};
pub use runner::{run, run_file, spawn, spawn_file};
pub use types::{ExecResult, ScriptOptions, SpawnResult};
pub use tokio::process::Child;