Support cargo binstall for easy binary installations
danielparks opened this issue · comments
It would be really nice if this natively supported cargo-binstall. It would make installation much easier and faster, and in particular would be nice for CI.
It is currently possible to install with binstall, but it requires a bit of configuration:
❯ cargo binstall -y --pkg-url="{ repo }/releases/download/v{ version }/{ name }_v{ version }_Darwin_x86_64{ archive-suffix }" --pkg-fmt="tar" cargo-msrv
INFO resolve: Resolving package: 'cargo-msrv'
WARN resolve: The package will be downloaded from github.com
INFO resolve: This will install the following binaries:
INFO resolve: - cargo-msrv (cargo-msrv -> /Users/daniel/.cargo/bin/cargo-msrv-v0.15.1)
INFO resolve: And create (or update) the following symlinks:
INFO resolve: - cargo-msrv (/Users/daniel/.cargo/bin/cargo-msrv -> cargo-msrv-v0.15.1)
INFO install: Installing binaries...
INFO Done in 3.526309163s
I think all that would be required would be to rename the uploaded release assets with the Rust target, e.g. “x86_64-unknown-linux-gnu” (or whatever) rather than “Linux_x86_64”.
You can get more information about how to support binstall in their SUPPORT.md document.
Sure! Currently this can also be achieved with the docker image.
I think all that would be required would be to rename the uploaded release assets with the Rust target, e.g. “x86_64-unknown-linux-gnu” (or whatever) rather than “Linux_x86_64”.
This part was already on my long term planning list. I will try to prioritize it more.
This can now be fairly easily handled by using cargo-dist to build and upload the binaries.
This can now be fairly easily handled by using cargo-dist to build and upload the binaries.
I saw the announcement; but didn't read it in detail yet, so maybe I'm wrong about the following: I was under the impression that there was no support yet for including custom files (with cargo-msrv we include a third party licenses file).
In any case, I think it shouldn't be too difficult to refactor the current workflow slightly by editing the archive name generation step, and adding a step to create a custom binary name; all information necessary is already present.
Thanks for the link though!
Available from https://github.com/foresterre/cargo-msrv/releases/tag/v0.16.0-beta.6.
Output on windows:
❯ cargo binstall cargo-msrv --version 0.16.0-beta.6
INFO resolve: Resolving package: 'cargo-msrv'
WARN The package cargo-msrv v0.16.0-beta.6 will be downloaded from github.com
INFO This will install the following binaries:
INFO - cargo-msrv (cargo-msrv.exe -> C:\Users\a\.cargo\bin\cargo-msrv-v0.16.0-beta.6.exe)
INFO And create (or update) the following symlinks:
INFO - cargo-msrv (C:\Users\a\.cargo\bin\cargo-msrv.exe -> C:\Users\a\.cargo\bin\cargo-msrv-v0.16.0-beta.6.exe)
Do you wish to continue? yes/[no]
? yes
INFO Installing binaries...
INFO Done in 7.4288333s
Output on Ubuntu:
❯ cargo binstall cargo-msrv --version 0.16.0-beta.6
INFO resolve: Resolving package: 'cargo-msrv'
WARN The package cargo-msrv v0.16.0-beta.6 will be downloaded from github.com
INFO This will install the following binaries:
INFO - cargo-msrv (cargo-msrv -> /home/a/.cargo/bin/cargo-msrv-v0.16.0-beta.6)
INFO And create (or update) the following symlinks:
INFO - cargo-msrv (/home/a/.cargo/bin/cargo-msrv -> cargo-msrv-v0.16.0-beta.6)
Do you wish to continue? yes/[no]
? yes
INFO Installing binaries...
INFO Done in 7.443174378s
Since I don't have a mac, I can't test it on macOS, so 🤞
Thanks, it works perfectly on macOS:
❯ cargo binstall cargo-msrv --version 0.16.0-beta.6
INFO resolve: Resolving package: 'cargo-msrv'
WARN resolve: The package will be downloaded from github.com
INFO resolve: This will install the following binaries:
INFO resolve: - cargo-msrv (cargo-msrv -> /Users/daniel/.cargo/bin/cargo-msrv-v0.16.0-beta.6)
INFO resolve: And create (or update) the following symlinks:
INFO resolve: - cargo-msrv (/Users/daniel/.cargo/bin/cargo-msrv -> cargo-msrv-v0.16.0-beta.6)
Do you wish to continue? yes/[no]
? y
INFO install: Installing binaries...
INFO Done in 6.984581909s