| Crates.io | openrunner |
| lib.rs | openrunner |
| version | 1.0.0 |
| created_at | 2025-06-08 21:57:10.463565+00 |
| updated_at | 2025-06-08 21:57:10.463565+00 |
| description | A Rust library for running OpenScript |
| homepage | https://github.com/openrunner-dev/openrunner-rs |
| repository | https://github.com/openrunner-dev/openrunner-rs |
| max_upload_size | |
| id | 1705294 |
| size | 67,555 |
OpenRunner is a Rust library for running OpenScript scripts from Rust code, with full control over execution, I/O, environment, and process lifecycle.
Add to your Cargo.toml:
[dependencies]
openrunner = "1.0"
Example:
use openrunner::run;
#[tokio::main]
async fn main() -> openrunner::Result<()> {
let result = run(r#"echo "Hello from OpenScript!""#, Default::default()).await?;
println!("Output: {}", result.stdout);
Ok(())
}
See examples/ for more!
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>run_script!spawn_script!run_file_script!cargo test
Run tests in a container:
docker build -t openrunner .
docker run openrunner
Dual-licensed MIT or Apache 2.0.