#bin #cache #dev-experiance #developer-experiance

app cargo-run-bin

A simple tool to build, cache, and run binaries scoped in Cargo.toml rather than installing globally. This acts similarly to npm run and gomodrun.

4 releases (2 breaking)

0.3.1 Dec 17, 2021
0.3.0 Dec 15, 2021
0.2.0 Aug 27, 2021
0.1.0 May 30, 2021

#1069 in Command line utilities

Download history 16/week @ 2022-03-14 19/week @ 2022-03-21 4/week @ 2022-04-04 5/week @ 2022-04-18 9/week @ 2022-04-25 34/week @ 2022-05-02 44/week @ 2022-05-09 88/week @ 2022-05-16 34/week @ 2022-05-23 41/week @ 2022-05-30 18/week @ 2022-06-06 6/week @ 2022-06-13 15/week @ 2022-06-20

85 downloads per month

MIT license

11KB
209 lines

cargo-run-bin

Build status Coverage Status Crates.io

A simple tool to build, cache, and run binaries scoped in Cargo.toml rather than installing globally. This acts similarly to npm run and gomodrun.

Disclaimer: This tool was built out of wanting a missing piece in the Rust development experience when initially learning the language, and is not likely to be optimal or feature complete just yet.

Installation

  cargo install cargo-run-bin

Usage

  1. Add your binary dependency to your Cargo.toml like any dependency
  cargo add --dev flamegraph
  1. Run your desired command prefixed with cargo bin. Note first runs will build your binary silently first before executing, all future runs will be instant.
  cargo bin flamegraph --help
  1. Update your .gitignore to exclude the cached binaries.
  echo ".bin/" >> .gitignore

License

MIT.

Dependencies

~2.2–3MB
~65K SLoC