#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

#43 in #execute

Download history 1/week @ 2024-03-13 10/week @ 2024-03-27 16/week @ 2024-04-03

63 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