An open API service indexing awesome lists of open source software.

https://github.com/kizzycode/ezexec-rust

A simple API to execute binaries or shell commands via `std::process::Command`
https://github.com/kizzycode/ezexec-rust

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

[![License BSD-2-Clause](https://img.shields.io/badge/License-BSD--2--Clause-blue.svg)](https://opensource.org/licenses/BSD-2-Clause)
[![License MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![AppVeyor CI](https://ci.appveyor.com/api/projects/status/github/KizzyCode/ezexec-rust?svg=true)](https://ci.appveyor.com/project/KizzyCode/ezexec-rust)
[![docs.rs](https://docs.rs/ezexec/badge.svg)](https://docs.rs/ezexec)
[![crates.io](https://img.shields.io/crates/v/ezexec.svg)](https://crates.io/crates/ezexec)
[![Download numbers](https://img.shields.io/crates/d/ezexec.svg)](https://crates.io/crates/ezexec)
[![dependency status](https://deps.rs/crate/ezexec/0.4.1/status.svg)](https://deps.rs/crate/ezexec/0.4.1)

# `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
```rust
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(())
}
```