Crate of the Week

I would like to nominate cmd_lib.

This is a library that provides a couple macros that make it much more convenient to write shell-script-like programs in Rust. In particular, spawning commands, capturing stdout, redirection and pipes are much less verbose than just using std. It even has nice logging built in.

I still think Bash is fine for scripts of a couple dozen lines, but this has lowered the threshold for me to migrate medium-sized or multi-file scripts to Rust.

Could also be interesting from a cross-platform perspective!

4 Likes