#shell #command #api #binaries #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

#53 in #execute

Download history 12/week @ 2024-09-19 10/week @ 2024-09-26

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