https://github.com/cargo-bins/cargo-binstall

Binary installation for rust projects

https://github.com/cargo-bins/cargo-binstall

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.3%) to scientific vocabulary

Keywords

binary installer rust

Keywords from Contributors

argument-parser autograder subcommands positional-arguments interpretability parsed-arguments standardization command-line-parser sequences hack
Last synced: 5 months ago · JSON representation

Repository

Binary installation for rust projects

Basic Info
  • Host: GitHub
  • Owner: cargo-bins
  • License: gpl-3.0
  • Language: Rust
  • Default Branch: main
  • Homepage:
  • Size: 4.82 MB
Statistics
  • Stars: 2,167
  • Watchers: 7
  • Forks: 77
  • Open Issues: 93
  • Releases: 0
Topics
binary installer rust
Created about 5 years ago · Last pushed 6 months ago
Metadata Files
Readme Funding Support

README.md

Cargo 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.

CI build GitHub tag Crates.io

You may want to see this page as it was when the latest version was published.

Usage

console $ cargo binstall radio-sx128x@0.14.1-alpha.5 INFO resolve: Resolving package: 'radio-sx128x@=0.14.1-alpha.5' WARN The package radio-sx128x v0.14.1-alpha.5 (x86_64-unknown-linux-gnu) has been downloaded from github.com INFO This will install the following binaries: INFO - sx128x-util (sx128x-util-x86_64-unknown-linux-gnu -> /home/.cargo/bin/sx128x-util) Do you wish to continue? [yes]/no ? yes INFO Installing binaries... 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.

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:

| OS | Arch | URL | | ------- | ------- | ------------------------------------------------------------ | | Linux | x86_64 | https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x8664-unknown-linux-musl.tgz | | Linux | armv7 | https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-armv7-unknown-linux-musleabihf.tgz | | Linux | arm64 | https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-aarch64-unknown-linux-musl.tgz | | Mac | Intel | https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x8664-apple-darwin.zip | | Mac | Apple Silicon | https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-aarch64-apple-darwin.zip | | Mac | Universal
(both archs) | https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-universal-apple-darwin.zip | | Windows | Intel/AMD | https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-pc-windows-msvc.zip | | Windows | ARM 64 | https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-aarch64-pc-windows-msvc.zip |

From source

With a recent Rust installed:

cargo install cargo-binstall

In GitHub Actions

We provide a first-party, minimal action that installs the latest version of Binstall:

yml - uses: cargo-bins/cargo-binstall@main

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.

console $ 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 on 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-telemetry flag in the command line interface.
  • Setting the BINSTALL_DISABLE_TELEMETRY environment variable to true.
  • Disabling the quickinstall strategy with --disable-strategy quick-install, or if specifying a list of strategies to use with --strategy, avoiding including quickinstall in that list.
  • Adding quick-install to the disabled-strategies configuration 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.

Owner

  • Name: cargo-bins
  • Login: cargo-bins
  • Kind: organization

Cargo (rust) binary tools

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 2,098
  • Total Committers: 55
  • Avg Commits per committer: 38.145
  • Development Distribution Score (DDS): 0.53
Past Year
  • Commits: 313
  • Committers: 20
  • Avg Commits per committer: 15.65
  • Development Distribution Score (DDS): 0.447
Top Committers
Name Email Commits
Jiahao XU J****U@o****m 986
github-actions[bot] 4****] 453
dependabot[bot] 4****] 373
Félix Saparelli f****x@p****e 163
ryan r****n@k****z 59
azzamsa 1****a 5
Christof Weickhardt c****f@w****h 4
pinage404 p****4@g****m 3
Patrick José Pereira p****c@g****m 2
Ryo Yamashita q****p@g****m 2
Sculas c****t@s****z 2
наб n****i@n****z 2
Martijn Pieters mj@z****m 2
Diogo Sousa d****a@g****m 1
Dawid Ciężarkiewicz d****c@d****w 1
David Weis d****7@g****m 1
David Laban a****n@g****m 1
Dustin Blackman d****n 1
EdJoPaTo g****b@e****e 1
FlareFlo m****l@f****v 1
George Pollard p****s@p****s 1
Christopher Durham c****7@c****m 1
Christian Bruckmayer 3****r 1
Asger Hautop Drewsen a****r@t****m 1
Alessandro Candido c****e@g****m 1
Alejandro González 7****r 1
Álvaro Mondéjar Rubio m****4@g****m 1
xxchan x****f@g****m 1
xd009642 d****3@g****m 1
pepa65 p****5@p****t 1
and 25 more...

Issues and Pull Requests

Last synced: 5 months ago

All Time
  • Total issues: 215
  • Total pull requests: 1,474
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 1 day
  • Total issue authors: 102
  • Total pull request authors: 43
  • Average comments per issue: 3.82
  • Average comments per pull request: 0.49
  • Merged pull requests: 1,158
  • Bot issues: 4
  • Bot pull requests: 1,025
Past Year
  • Issues: 55
  • Pull requests: 553
  • Average time to close issues: 1 day
  • Average time to close pull requests: 1 day
  • Issue authors: 46
  • Pull request authors: 17
  • Average comments per issue: 2.07
  • Average comments per pull request: 0.27
  • Merged pull requests: 373
  • Bot issues: 2
  • Bot pull requests: 422
Top Authors
Issue Authors
  • NobodyXu (70)
  • passcod (18)
  • ahaoboy (6)
  • owenstake (5)
  • github-actions[bot] (3)
  • ryankurte (3)
  • nth10sd (3)
  • mjpieters (3)
  • ilyagr (3)
  • andrewdavidmackenzie (2)
  • max-sixty (2)
  • gilescope (2)
  • cocoonkid (2)
  • LikeLakers2 (2)
  • pepa65 (2)
Pull Request Authors
  • github-actions[bot] (668)
  • dependabot[bot] (357)
  • NobodyXu (356)
  • passcod (15)
  • pepa65 (8)
  • senekor (8)
  • patrickelectric (4)
  • kristof-mattei (4)
  • mjpieters (3)
  • dustinblackman (2)
  • timsutton (2)
  • ilkka (2)
  • mondeja (2)
  • matanlurey (2)
  • Cryolitia (2)
Top Labels
Issue Labels
Blocked: upstream (7) Report: feature request (5) github_actions (2) Report: bug (2) good first issue (1) Report: enhancement (1) PR: dependencies (1)
Pull Request Labels
PR: dependencies (497) rust (273) dependencies (109) github_actions (84) PR: improvement (3) Blocked: upstream (2) PR: feature work (2) help wanted (1) PR: bugfix (1)

Dependencies

.github/actions/just-setup/action.yml actions
  • Swatinem/rust-cache v2 composite
  • taiki-e/install-action v2 composite
.github/workflows/cache-cleanup.yml actions
  • actions/checkout v4 composite
.github/workflows/ci.yml actions
  • ./.github/actions/just-setup * composite
  • Swatinem/rust-cache v2 composite
  • actions/checkout v4 composite
.github/workflows/gh-action.yml actions
  • ./ * composite
  • actions/checkout v4 composite
.github/workflows/install-script.yml actions
  • actions/checkout v4 composite
.github/workflows/release-build.yml actions
  • ./.github/actions/just-setup * composite
  • actions/checkout v4 composite
  • actions/download-artifact v3 composite
  • actions/upload-artifact v3 composite
  • cargo-bins/cargo-binstall main composite
  • svenstaro/upload-release-action v2 composite
  • taiki-e/install-action v2 composite
.github/workflows/release-pr.yml actions
  • actions/checkout v4 composite
  • cargo-bins/release-pr v2 composite
  • chainguard-dev/actions/setup-gitsign main composite
  • taiki-e/install-action v2 composite
.github/workflows/release.yml actions
  • actions/checkout v4 composite
  • cargo-bins/cargo-binstall main composite
  • cargo-bins/release-meta v1 composite
  • mathieudutour/github-tag-action v6.1 composite
.github/workflows/shellcheck.yml actions
  • actions/checkout v4 composite
  • taiki-e/install-action v2 composite
.github/workflows/upgrade-transitive-deps.yml actions
  • actions/checkout v4 composite
action.yml actions
Cargo.lock cargo
  • 416 dependencies
Cargo.toml cargo
crates/atomic-file-install/Cargo.toml cargo
crates/bin/Cargo.toml cargo
crates/binstalk/Cargo.toml cargo
crates/binstalk-bins/Cargo.toml cargo
crates/binstalk-downloader/Cargo.toml cargo
crates/binstalk-fetchers/Cargo.toml cargo
  • binstalk-downloader 0.8.0 development
  • async-trait 0.1.68
  • binstalk-downloader 0.8.0
  • binstalk-types 0.5.0
  • bytes 1.4.0
  • compact_str 0.7.0
  • either 1.8.1
  • itertools 0.11.0
  • leon 2.0.1
  • leon-macros 1.0.0
  • miette 5.9.0
  • minisign-verify 0.2.1
  • once_cell 1.18.0
  • strum 0.25.0
  • thiserror 1.0.40
  • tokio 1.30.0
  • tracing 0.1.37
  • url 2.3.1
crates/binstalk-manifests/Cargo.toml cargo
  • detect-targets 0.1.11 development
  • tempfile 3.5.0 development
  • beef 0.5.2
  • binstalk-types 0.5.0
  • compact_str 0.7.0
  • fs-lock 0.1.0
  • home 0.5.5
  • miette 5.9.0
  • semver 1.0.17
  • serde 1.0.163
  • serde-tuple-vec-map 1.0.1
  • serde_json 1.0.107
  • thiserror 1.0.40
  • toml_edit 0.20.0
  • url 2.3.1
crates/binstalk-registry/Cargo.toml cargo
  • binstalk-downloader 0.8.0 development
  • tokio 1 development
  • toml_edit 0.20.0 development
  • async-trait 0.1.68
  • base16 0.2.1
  • binstalk-downloader 0.8.0
  • binstalk-types 0.5.0
  • cargo-toml-workspace 1.0.0
  • compact_str 0.7.0
  • leon 2.0.1
  • miette 5.9.0
  • normalize-path 0.2.1
  • once_cell 1.18.0
  • semver 1.0.17
  • serde 1.0.163
  • serde_json 1.0.107
  • sha2 0.10.7
  • simple-git 0.1.0
  • tempfile 3.5.0
  • thiserror 1.0.40
  • tokio 1.30.0
  • tracing 0.1.37
  • url 2.3.1
crates/binstalk-types/Cargo.toml cargo
crates/cargo-toml-workspace/Cargo.toml cargo
  • tempfile 3.5.0 development
  • binstalk-types 0.5.0
  • cargo_toml 0.16.0
  • compact_str 0.7.0
  • glob 0.3.1
  • normalize-path 0.2.1
  • thiserror 1.0.40
  • tracing 0.1.37
crates/detect-targets/Cargo.toml cargo
  • tokio 1.28.2 development
  • cfg-if 1.0.0
  • guess_host_triple 0.1.3
  • tokio 1.28.2
  • tracing 0.1.37
  • tracing-subscriber 0.3.17
crates/detect-wasi/Cargo.toml cargo
crates/fs-lock/Cargo.toml cargo
crates/leon/Cargo.toml cargo
crates/leon/benches/Cargo.lock cargo
  • anes 0.1.6
  • atty 0.2.14
  • autocfg 1.1.0
  • bitflags 1.3.2
  • cast 0.3.0
  • ciborium 0.2.0
  • ciborium-io 0.2.0
  • ciborium-ll 0.2.0
  • clap 3.2.23
  • clap_lex 0.2.4
  • criterion 0.4.0
  • criterion-plot 0.5.0
  • either 1.8.1
  • half 1.8.2
  • hashbrown 0.12.3
  • hermit-abi 0.1.19
  • indexmap 1.9.3
  • itertools 0.10.5
  • itoa 1.0.6
  • lazy_static 1.4.0
  • libc 0.2.142
  • miette 5.8.0
  • miette-derive 5.8.0
  • num-traits 0.2.15
  • once_cell 1.17.1
  • oorandom 11.1.3
  • os_str_bytes 6.5.0
  • proc-macro2 1.0.56
  • quote 1.0.26
  • regex 1.8.1
  • regex-syntax 0.7.1
  • ryu 1.0.13
  • same-file 1.0.6
  • serde 1.0.160
  • serde_derive 1.0.160
  • serde_json 1.0.96
  • syn 2.0.15
  • textwrap 0.16.0
  • thiserror 1.0.40
  • thiserror-impl 1.0.40
  • tinytemplate 1.2.1
  • unicode-ident 1.0.8
  • unicode-width 0.1.10
  • walkdir 2.3.3
  • winapi 0.3.9
  • winapi-i686-pc-windows-gnu 0.4.0
  • winapi-util 0.1.5
  • winapi-x86_64-pc-windows-gnu 0.4.0
crates/leon/benches/Cargo.toml cargo
crates/leon/fuzz/Cargo.lock cargo
  • arbitrary 1.2.3
  • cc 1.0.79
  • jobserver 0.1.25
  • libc 0.2.139
  • libfuzzer-sys 0.4.6
  • miette 5.5.0
  • miette-derive 5.5.0
  • once_cell 1.17.0
  • proc-macro2 1.0.51
  • quote 1.0.23
  • syn 1.0.107
  • thiserror 1.0.38
  • thiserror-impl 1.0.38
  • unicode-ident 1.0.6
  • unicode-width 0.1.10
crates/leon/fuzz/Cargo.toml cargo
crates/leon-macros/Cargo.toml cargo
crates/normalize-path/Cargo.toml cargo
crates/simple-git/Cargo.toml cargo
e2e-tests/manifests/workspace/Cargo.toml cargo
e2e-tests/manifests/workspace/b/c/d/e/f/Cargo.toml cargo
e2e-tests/manifests/workspace/crates/a/b/c/d/e/cargo-binstall/Cargo.toml cargo
e2e-tests/manifests/workspace/crates/a/b/c/d/e/cargo-watch/Cargo.toml cargo
zigbuild-requirements.txt pypi
  • cargo-zigbuild *
  • ziglang <0.11