Crates.io | ezexec |
lib.rs | ezexec |
version | 0.4.1 |
source | src |
created_at | 2021-09-09 17:33:57.45107 |
updated_at | 2022-12-31 03:06:00.460211 |
description | A simple API to execute binaries or shell commands via `std::process::Command` |
homepage | |
repository | https://github.com/KizzyCode/ezexec-rust |
max_upload_size | |
id | 448962 |
size | 25,334 |
ezexec
Welcome to ezexec
🎉
ezexec
provides a simple API to execute binaries or shell commands. Furthermore it implements a trivial but usually
good-enough API to find a binary in PATH
or to get the current shell.
use ezexec::{ ExecBuilder, error::Error };
fn list() -> Result<(), Error> {
// Lists all files in the current directory and forwards the output to the parent's stdout
ExecBuilder::with_shell("ls")?
.spawn_transparent()?
.wait()?;
Ok(())
}