ezexec

Crates.ioezexec
lib.rsezexec
version0.4.1
sourcesrc
created_at2021-09-09 17:33:57.45107
updated_at2022-12-31 03:06:00.460211
descriptionA simple API to execute binaries or shell commands via `std::process::Command`
homepage
repositoryhttps://github.com/KizzyCode/ezexec-rust
max_upload_size
id448962
size25,334
Keziah Biermann (KizzyCode)

documentation

README

License BSD-2-Clause License MIT AppVeyor CI docs.rs crates.io Download numbers dependency status

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.

Example

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(())
}
Commit count: 7

cargo fmt