Skip to content

Add cargo-binstall metadata so prebuilt release binaries are used - #2271

Open
igitur wants to merge 1 commit into
dandavison:mainfrom
igitur:binstall-metadata
Open

igitur wants to merge 1 commit into
dandavison:mainfrom
igitur:binstall-metadata

Conversation

@igitur

@igitur igitur commented Oct 6, 2026

Copy link
Copy Markdown

Adds the one [package.metadata.binstall] entry needed for cargo binstall git-delta to install the prebuilt release binaries.

binstall already finds and downloads delta-<version>-<target>.tar.gz, but it renders its default pkg-url templates with the binary name (delta) while inferring the archive directory with the crate name (git-delta). It therefore looks for git-delta-0.20.1-x86_64-unknown-linux-gnu/delta, doesn't find it, reports "please contact with upstream to fix this issue", and falls back to compiling from source. Naming the directory explicitly fixes that. No CI or release-asset changes are needed.

Deliberately no pkg-fmt: leaving it unset makes binstall try every supported format, which is what lets the Windows .zip work with this same entry.

Refs #1587 (the issue carries the design discussion, so this is intentionally not a Closes).

Verification — cargo-binstall 1.24.0, --strategies crate-meta-data --dry-run, run against this repo's own Cargo.toml via --manifest-path:

  • unpatched: ERROR resolve: When resolving git-delta bin delta is not found … please contact with upstream, then falls back to installing from source.
  • patched: downloads the official delta-0.20.1-x86_64-unknown-linux-gnu.tar.gz and resolves delta for install.

The same metadata also resolves x86_64-unknown-linux-musl, x86_64-pc-windows-msvc (from the .zip) and aarch64-apple-darwin in dry runs. x86_64-apple-darwin has no published artifact, so it still falls back to source — that's an artifact gap, not a metadata one.

The investigation and the dry-run verification were done with AI assistance; I've reviewed the change.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant