Skip to content

Support for installing ripgrep with cargo-binstall #2298

@tomkarw

Description

@tomkarw

Describe your feature request

cargo-binstall is a way to fetch precompiled binaries without the need to build from source. It is meant to speed up installing new cargo tools.

By default, cargo-binstall will look for GitHub releases artifacts, and ripgrep has these. Unfortunately, cargo-generate requires the version component to conform to v.* pattern, and ripgrep doesn't include the v.

The easiest way to achieve the desired result would be to override this default by adding this to Cargo.toml:

[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/{ version }/{ name }-{ target }-v{ version }.{ archive-format }"

(notice the lack of v in the version component)

If support for cargo-binstall is deemed preferable, I'd be happy to land such PR and test that this solution works.

Alternative

An alternative would be to change the naming conventions for the releases, but I think the above solution is more surgical and less interfering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn enhancement to the functionality of the software.help wantedOthers are encouraged to work on this issue.rollupA PR that has been merged with many others in a rollup.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions