#command #executor #stdout #ls #ezexec #with-shell

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

#34 in #ls

Download history 9/week @ 2025-02-05 17/week @ 2025-02-12 3/week @ 2025-02-26 3/week @ 2025-03-12 33/week @ 2025-04-16 27/week @ 2025-04-23 48/week @ 2025-04-30

108 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