#shell #command #binaries #api #execute #path #binary

ezexec

A simple API to execute binaries or shell commands via std::process::Command

6 releases (3 breaking)

0.4.1 Dec 31, 2022
0.4.0 Dec 31, 2022
0.3.0 Mar 16, 2022
0.2.0 Oct 4, 2021
0.1.1 Sep 18, 2021

#32 in #execute

28 downloads per month
Used in 3 crates

BSD-2-Clause OR MIT

20KB
406 lines

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(())
}

No runtime deps