OpenRunner-RS
OpenRunner is a Rust library for running OpenScript scripts from Rust code, with full control over execution, I/O, environment, and process lifecycle.
Features
- Run OpenScript code from Rust (string or file)
- Full async support (tokio)
- Fine-grained control over I/O, env, working directory, timeout, and more
- Spawn OpenScript processes for long-running jobs
- Convenience macros for quick scripting
- Designed to integrate seamlessly with OpenScript and OpenScript-based workflows
Quick Start
Add to your Cargo.toml:
[]
= "1.0"
Example:
use run;
async
Advanced Usage
See examples/ for more!
API
run(script: &str, options: ScriptOptions) -> Result<ExecResult>run_file(path: impl Into<PathBuf>, options: ScriptOptions) -> Result<ExecResult>spawn(script: &str, options: ScriptOptions) -> Result<Child>spawn_file(path: impl Into<PathBuf>, options: ScriptOptions) -> Result<Child>
Macros
run_script!spawn_script!run_file_script!
Testing
Docker
Run tests in a container:
License
Dual-licensed MIT or Apache 2.0.