GitHub

This repository just contains a little script that can be downloaded from the internet to install a Rust crate from a GitHub release. It determines the latest release, the current platform (without the need for rustc), and installs the extracted binary to the specified location.

Usage

To install a crate simply run the following

curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh \
    | bash -s -- --repo "<username>/<repository>" --to ~/.cargo/bin

Examples

cross

curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh \
    | bash -s -- --repo rust-embedded/cross --to /usr/local/bin

hyperfine

curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh \
    | bash -s -- --repo sharkdp/hyperfine --to /usr/local/bin

just

curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh \
    | bash -s -- --repo casey/just --to /usr/local/bin

ripgrep

curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh \
    | bash -s -- --repo BurntSushi/ripgrep --bin rg --to /usr/local/bin

sheldon

curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh \
    | bash -s -- --repo rossmacarthur/sheldon --to /usr/local/bin

Acknowledgements

This script was inspired by the japaric/trust install script. The platform detection code is taken from rust-lang/rustup.

License

This project is licensed under either of

Read the original on github.com ↗