github cargo-bins/cargo-binstall v1.29.0

45 minutes ago

Binstall is a tool to fetch and install Rust-based executables as binaries. It aims to be a drop-in replacement for cargo install in most cases. Install it today with cargo install cargo-binstall, from the binaries below, or if you already have it, upgrade with cargo binstall cargo-binstall.

In this release:

  • Far fewer requests, and much less use of the GitHub API rate limit. Release tags are found with one git ls-refs request, github.com's public asset lists are read without the API, all candidate releases are queried in one GraphQL request, and missing tags are skipped early. Installing nu with 4 plugins while rate limited went from 2313 requests to 28 (#2805 #2806 #2807 #2808 #2813 #2814 #2855 #2856 #2857 #2860 #2865 #2868 #2876)
  • Crates installed together from the same repository share its lookups, and one release archive is downloaded and extracted only once (e.g. cargo binstall nu nu_plugin_polars nu_plugin_query) (#1702 #2839)
  • Skip binaries that can't run on this host: a gnu build needing a newer glibc than the system has, or a dynamically linked musl build without its loader, now falls back to the next candidate (usually musl). Nothing is executed for the check, and --targets turns it off (#1332 #1466 #2845)
  • --branch, --tag and --rev for --git, like cargo install (#1165 #2844)
  • pkg-url can use { bin }, so crates that release one package per binary can be installed (#2573 #2784)
  • Look for a package named after the crate's binary (e.g. fd-… for fd-find) before trying QuickInstall (#2859)
  • Use the sole top-level directory of an archive as bin-dir, e.g. foo_1.2.3_x86_64-unknown-linux-gnu/foo (#2829)
  • Share Cargo's clone of a git registry index instead of cloning it on every run (#1264 #2832)
  • Use Cargo's http.proxy / CARGO_HTTP_PROXY (#2852)
  • Use Cargo's http.timeout (30 s by default), with a new --http-timeout flag, so a server that stops answering no longer hangs binstall forever (#2875)
  • Skip the .crate download when the crate is already up to date, and download a package from the GET that found it instead of requesting it twice (#2818 #2819)
  • Detect arm64ec-pc-windows-msvc on Windows ARM64 (#1770 #2842)
  • Suggest --dns system when hickory-dns fails to resolve a host (#2858)
  • The .full release packages now really contain debug symbols on Linux (.debug), macOS (.dSYM) and Windows (.pdb) (#659 #664 #2817)
  • Install script falls back to wget when curl is missing (#1252 #2835)
  • GitHub Action defaults to the version of its own checkout, so a tag- or SHA-pinned action installs the binstall it is pinned to, thank you @goosewobbler (#2863 #2864)

Security

  • Keep tokens out of logs, error messages and --help (which printed GITHUB_TOKEN's value) (#2872)
  • Keep credentials from registry and --git URLs out of the install records (.crates.toml, .crates2.json, crates-v1.json); binstall's own crates-v1.json is also cleaned up the next time it is loaded (#2884)
  • Git URLs are redacted when printed but passed on with their credentials, so cargo install --index with a password works again (#2885 #2878)

Fixed

  • --targets is now split on commas, as documented (#2873)
  • Don't reinstall when the installed version already is the newest one matching a requirement like foo@^1 (#2877)
  • Use GH_TOKEN when GITHUB_TOKEN is set but empty, which is common in CI (#2880)
  • Fall back to git credential fill, without prompting, when gh auth token fails (#2886)
  • The cargo install fallback of a --git install now builds from that repository, not the registry (#2874)
  • A crate name typed with the wrong case is reported as not found instead of a 404 on the download (#2881)
  • Resolve relative paths in Cargo's config (e.g. install.root) against the parent of .cargo, like Cargo (#2882)
  • Record the absolute directory as the source of a --manifest-path install (#2883)
  • Keep a trailing ) in .crates.toml source URLs, e.g. a path like dir (1) (#2849 #2850)
  • A failed candidate no longer hides another candidate's success, thank you @kixelated (#2854)
  • Keep the downloaded version when --self-install fails in the install scripts and the action, thank you @goosewobbler (#2866)
  • "Done in" no longer counts the time spent answering prompts (#463 #2836)
  • Don't panic when the runtime shuts down during macOS target detection (#2848)

Other changes:

  • Docs: installing projects not on crates.io, and using proxies (#1609 #2837)
  • Add the cargo-binstall logo to the README and docs.rs, thank you @saylesss88 (#2686 #2787)
  • Smaller futures and less duplicated code (#2869 #2870 #2871), less CPU while waiting on the rate limiter (#2816)
  • upgrade dependencies

Don't miss a new cargo-binstall release

NewReleases is sending notifications on new releases.