just-run

Crates.iojust-run
lib.rsjust-run
version0.1.0
sourcesrc
created_at2024-10-04 15:24:07.148421
updated_at2024-10-04 15:24:07.148421
descriptionConvenience crate for executing system commands with the expectation of successful termination and UTF-8 encoded output, for basic straightforward command execution scenarios.
homepage
repositoryhttps://github.com/plul/just-run
max_upload_size
id1396701
size10,129
Asger Juul Brunshøj (plul)

documentation

README

just-run

just-run is a simple convenience crate for executing system commands with the expectation of successful termination and UTF-8 encoded output. It aims to handle the most common case without extensive configuration or edge case coverage.

Usage

use just_run::{run, Success};

let Success { stdout, stderr } = run("echo", ["Hello world!"]).expect("Command failed");
println!("{stdout}");

See also

For more advanced use cases, consider checking out the duct crate or using the standard library tools directly.

Commit count: 3

cargo fmt