From 706fc4181602b5d0b8b18f1eef822fd572e3ea22 Mon Sep 17 00:00:00 2001 From: qedk <1994constant@gmail.com> Date: Wed, 5 Jul 2023 17:03:56 +0400 Subject: [PATCH] feat: add cargo binstall support (#3578) --- Cargo.toml | 5 +++++ book/installation/binaries.md | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 11ba1a26f..7aa869fdc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -133,3 +133,8 @@ futures-util = "0.3.25" ## crypto secp256k1 = { version = "0.27.0", default-features = false, features = ["global-context", "rand-std", "recovery"] } + +[package.metadata.binstall] +pkg-url = "{ repo }/releases/download/v{ version }/{ name }-v{ version }-{ target }{ archive-suffix }" +bin-dir = "{ bin }{ binary-ext }" +pkg-fmt = "tgz" diff --git a/book/installation/binaries.md b/book/installation/binaries.md index 0adbf634e..31fa92f19 100644 --- a/book/installation/binaries.md +++ b/book/installation/binaries.md @@ -26,3 +26,10 @@ As an example, you could install the Linux x86_64 version like so: 1. Test the binary with `./reth --version` (it should print the version). 2. (Optional) Move the `reth` binary to a location in your `PATH`, so the `reth` command can be called from anywhere. For most Linux distros, you can move the binary to `/usr/local/bin`: `sudo cp ./reth /usr/local/bin`. + +### Using `cargo-binstall` +Alternatively, if you have [binstall](https://github.com/cargo-bins/cargo-binstall) installed, you can use it to install and load the binary: +```bash +cargo binstall reth +``` +