cargo-bins/cargo-binstall
cargo-bins/cargo-binstall has 2,955 GitHub stars and 133 forks. GitHot measured +2 stars in 24 hours. Last checked 2026-11-06 19:49 UTC. Last push 2026-11-02.
Binary installation for rust projects
Measured star growth
- in 24h
- +2
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalCargo B(inary)Install
Binstall provides a low-complexity mechanism for installing Rust binaries as an
alternative to building from source (via cargo install) or manually
downloading packages. This is intended to work with existing CI artifacts and
infrastructure, and with minimal overhead for package maintainers.
Binstall works by fetching the crate information from crates.io and searching
the linked repository for matching releases and artifacts, falling back to the
quickinstall third-party
artifact host, to alternate targets as supported, and finally to cargo install
as a last resort.
You may want to see this page as it was when the latest version was published.
Usage
$ cargo binstall [email protected]
cargo-binstall: INFO resolve: Resolving package: 'radio-sx128x@=0.14.1-alpha.5'
cargo-binstall: WARN The package radio-sx128x v0.14.1-alpha.5 (x86_64-unknown-linux-gnu) has been downloaded from github.com
cargo-binstall: INFO This will install the following binaries:
cargo-binstall: INFO - sx128x-util (sx128x-util-x86_64-unknown-linux-gnu -> /home/.cargo/bin/sx128x-util)
Do you wish to continue? [yes]/no
? yes
cargo-binstall: INFO Installing binaries...
cargo-binstall: INFO Done in 2.838798298s
Binstall aims to be a drop-in replacement for cargo install in many cases, and
supports similar options.
For unattended use (e.g. in CI), use the --no-confirm flag. For additional
options please see cargo binstall --help.
For Crate Authors
To support cargo binstall for your crate, add metadata to your Cargo.toml
and publish pre-built binaries to GitHub Releases on each release.
See SUPPORT.md for full documentation on the metadata format, artifact naming, and supported options.
Installation
If you already have it
To upgrade cargo-binstall, use cargo binstall cargo-binstall!
Quickly
Here are one-liners for downloading and installing a pre-compiled
cargo-binstall binary.
Linux and macOS
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
or if you have homebrew installed:
brew install cargo-binstall
Windows
Set-ExecutionPolicy Unrestricted -Scope Process; iex (iwr "https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.ps1").Content
Manually
Download the relevant package for your system below, unpack it, and move the
cargo-binstall executable into $HOME/.cargo/bin:
From source
With a recent Rust installed:
cargo install cargo-binstall --locked
In GitHub Actions
We provide a first-party, minimal action that installs Binstall:
- uses: cargo-bins/cargo-binstall@main
with:
version: "1.2.3" # optional; defaults to latest
For more features, we recommend the excellent taiki-e/install-action, which has dedicated support for selected tools and uses Binstall for everything else.
Companion tools
These are useful third-party tools which work well with Binstall.
cargo-update
While you can upgrade crates explicitly by running cargo binstall again,
cargo-update takes care of updating all tools as needed. It automatically uses
Binstall to install the updates if it is present.
cargo-run-bin
Binstall and cargo install both install tools globally by default, which is
fine for system-wide tools. When installing tooling for a project, however, you
may prefer to both scope the tools to that project and control their versions in
code. That's where cargo-run-bin comes in, with a dedicated section in your
Cargo.toml and a short cargo subcommand. When Binstall is available, it installs
from binary whenever possible... and you can even manage Binstall itself with
cargo-run-bin!
Unsupported crates
Binstall is generally smart enough to auto-detect artifacts in most situations.
However, if a package fails to install, you can manually specify the pkg-url,
bin-dir, and pkg-fmt as needed at the command line, with values as
documented in
SUPPORT.md.
$ cargo-binstall \
--pkg-url="{ repo }/releases/download/{ version }/{ name }-{ version }-{ target }.{ archive-format }" \
--pkg-fmt="txz" \
crate_name
Maintainers wanting to make their users' life easier can add
explicit Binstall metadata
to Cargo.toml to locate the appropriate binary package for a given version and
target.
Signatures
We have initial, limited support for maintainers to specify a signing public key and where to find package signatures. With this enabled, Binstall will download and verify signatures for that package.
You can use --only-signed to refuse to install packages if they're not signed.
If you like to live dangerously (please don't use this outside testing), you can
use --skip-signatures to disable checking or even downloading signatures at
all.
FAQ
Why use this?
Because wget-ing releases is frustrating, cargo install takes a not
inconsequential portion of forever on constrained devices, and often putting
together actual packages is overkill.
Why use the cargo manifest?
Crates already have these, and they already contain a significant portion of the
required information. Also, there's this great and woefully underused (IMO)
[package.metadata] field.
Is this secure?
Yes and also no?
We have initial support for verifying signatures, but not a lot of the ecosystem produces signatures at the moment. See #1 to discuss more on this.
We always pull the metadata from crates.io over HTTPS, and verify the checksum of the crate tar. We also enforce using HTTPS with TLS >= 1.2 for the actual download of the package files.
Compared to something like a curl ... | sh script, we're not running arbitrary
code, but of course the crate you're downloading a package for might itself be
malicious!
What do the error codes mean?
You can find a full description of errors including exit codes here: https://docs.rs/binstalk/latest/binstalk/errors/enum.BinstallError.html
Are debug symbols available?
Yes! Extra pre-built packages with a .full suffix are available and contain
split debuginfo, documentation files, and extra binaries like the detect-wasi
utility.
Telemetry collection
Some crate installation strategies may collect anonymized usage statistics by
default. Currently, only the name of the crate to be installed, its version, the
target platform triple, and the collecting user agent are sent to endpoints
under the https://cargo-quickinstall-stats-server.fly.dev/record-install URL
when the quickinstall artifact host is used. The maintainers of the
quickinstall project use this data to determine which crate versions are most
worthwhile to build and host. The aggregated collected telemetry is publicly
accessible at
https://alsuren.grafana.net/public-dashboards/12d4ec3edf2548a1850a813e00592b53.
Should you be interested in it, the backend code for these endpoints can be
found at
https://github.com/cargo-bins/cargo-quickinstall/tree/main/stats-server.
If you prefer not to participate in this data collection, you can opt out by any of the following methods:
- Setting the
--disable-telemetryflag in the command line interface. - Setting the
BINSTALL_DISABLE_TELEMETRYenvironment variable totrue. - Disabling the
quickinstallstrategy with--disable-strategies quick-install, or if specifying a list of strategies to use with--strategies, avoiding includingquick-installin that list. - Adding
quick-installto thedisabled-strategiesconfiguration key in the crate metadata (refer to the related support documentation for more details).
If you have ideas/contributions or anything is not working the way you expect
(in which case, please include an output with --log-level debug) and feel free
to open an issue or PR.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,581 starspublic-apis/public-apis
A collective list of free APIs
496,852 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
439,326 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,102 stars