Skip to content

Build, cache, and run binaries scoped in Cargo.toml rather than installing globally

License

Notifications You must be signed in to change notification settings

hodlen/cargo-run-bin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 cross
  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 cross --help
  1. Update your .gitignore to exclude the cached binaries.
  echo ".bin/" >> .gitignore

MIT.

About

Build, cache, and run binaries scoped in Cargo.toml rather than installing globally

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%