change(readme): Install from crates.io not git in the README, automate release version replacements (#6977)
* Install from crates.io not git * Move git instructions to install.md * Add versions back to install.md * Automate release replacements in Cargo.toml * Re-add h4 to re-enable links to those sections * Remove release replacements from zebra/Cargo.toml * Add release replacements to zebrad/Cargo.toml * Put the toml table in the right place * Try another place in Cargo.toml * Let's try again without "package." * Remove duplicate release metadata from Cargo.toml * Apply suggestions from code review Co-authored-by: Marek <mail@marek.onl> --------- Co-authored-by: Marek <mail@marek.onl>
This commit is contained in:
parent
b40fc9b032
commit
795d40a003
|
@ -17,6 +17,8 @@ members = [
|
||||||
# Use the edition 2021 dependency resolver in the workspace, to match the crates
|
# Use the edition 2021 dependency resolver in the workspace, to match the crates
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
|
# Compilation settings
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
panic = "abort"
|
panic = "abort"
|
||||||
|
|
||||||
|
|
16
README.md
16
README.md
|
@ -74,7 +74,9 @@ Every few weeks, we release a [new Zebra version](https://github.com/ZcashFounda
|
||||||
|
|
||||||
Below are quick summaries for installing the dependencies on your machine.
|
Below are quick summaries for installing the dependencies on your machine.
|
||||||
|
|
||||||
<details><summary><h4>General instructions for installing dependencies</h4></summary>
|
<details>
|
||||||
|
|
||||||
|
<summary><h4>General instructions for installing dependencies</h4></summary>
|
||||||
|
|
||||||
1. Install [`cargo` and `rustc`](https://www.rust-lang.org/tools/install).
|
1. Install [`cargo` and `rustc`](https://www.rust-lang.org/tools/install).
|
||||||
|
|
||||||
|
@ -88,7 +90,9 @@ Below are quick summaries for installing the dependencies on your machine.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details><summary><h4>Dependencies on Arch</h4></summary>
|
<details>
|
||||||
|
|
||||||
|
<summary><h4>Dependencies on Arch</h4></summary>
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo pacman -S rust clang pkgconf
|
sudo pacman -S rust clang pkgconf
|
||||||
|
@ -98,10 +102,10 @@ Note that the package `clang` includes `libclang` as well as the C++ compiler.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
Once the dependencies are in place, you can build Zebra
|
Once the dependencies are in place, you can build and install Zebra:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cargo install --locked --git https://github.com/ZcashFoundation/zebra --tag v1.0.0 zebrad
|
cargo install --locked zebrad
|
||||||
```
|
```
|
||||||
|
|
||||||
You can start Zebra by
|
You can start Zebra by
|
||||||
|
@ -110,8 +114,8 @@ You can start Zebra by
|
||||||
zebrad start
|
zebrad start
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [Running Zebra](https://zebra.zfnd.org/user/run.html) section in the
|
See the [Installing Zebra](https://zebra.zfnd.org/user/install.html) and [Running Zebra](https://zebra.zfnd.org/user/run.html)
|
||||||
book for more details.
|
sections in the book for more details.
|
||||||
|
|
||||||
#### Optional Features
|
#### Optional Features
|
||||||
|
|
||||||
|
|
|
@ -2,19 +2,64 @@
|
||||||
|
|
||||||
Follow the [Docker or compilation instructions](https://zebra.zfnd.org/index.html#getting-started).
|
Follow the [Docker or compilation instructions](https://zebra.zfnd.org/index.html#getting-started).
|
||||||
|
|
||||||
#### ARM
|
## Installing Dependencies
|
||||||
|
|
||||||
|
To compile Zebra from source, you will need to [install some dependencies.](https://zebra.zfnd.org/index.html#building-zebra).
|
||||||
|
|
||||||
|
|
||||||
|
## Alternative Compilation Methods
|
||||||
|
|
||||||
|
### Compiling Manually from git
|
||||||
|
|
||||||
|
To compile Zebra directly from GitHub, or from a GitHub release source archive:
|
||||||
|
|
||||||
|
1. Install the dependencies (see above)
|
||||||
|
|
||||||
|
2. Get the source code using `git` or from a GitHub source package
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/ZcashFoundation/zebra.git
|
||||||
|
cd zebra
|
||||||
|
git checkout v1.0.0
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Build and Run `zebrad`
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cargo build --release --bin zebrad
|
||||||
|
target/release/zebrad start
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compiling from git using cargo install
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cargo install --git https://github.com/ZcashFoundation/zebra --tag v1.0.0 zebrad
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compiling on ARM
|
||||||
|
|
||||||
If you're using an ARM machine, [install the Rust compiler for
|
If you're using an ARM machine, [install the Rust compiler for
|
||||||
ARM](https://rust-lang.github.io/rustup/installation/other.html). If you build
|
ARM](https://rust-lang.github.io/rustup/installation/other.html). If you build
|
||||||
using the x86_64 tools, Zebra might run really slowly.
|
using the x86_64 tools, Zebra might run really slowly.
|
||||||
|
|
||||||
#### Build Troubleshooting
|
## Build Troubleshooting
|
||||||
|
|
||||||
If you're having trouble with:
|
If you're having trouble with:
|
||||||
|
|
||||||
Dependencies:
|
### Compilers
|
||||||
|
|
||||||
|
- **clang:** install both `libclang` and `clang` - they are usually different packages
|
||||||
|
- **libclang:** check out the [clang-sys documentation](https://github.com/KyleMayes/clang-sys#dependencies)
|
||||||
|
- **g++ or MSVC++:** try using clang or Xcode instead
|
||||||
|
- **rustc:** use the latest stable `rustc` and `cargo` versions
|
||||||
|
- Zebra does not have a minimum supported Rust version (MSRV) policy: any release can update the required Rust version.
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
- use `cargo install` without `--locked` to build with the latest versions of each dependency
|
- use `cargo install` without `--locked` to build with the latest versions of each dependency
|
||||||
|
|
||||||
|
#### Optional Tor feature
|
||||||
|
|
||||||
- **sqlite linker errors:** libsqlite3 is an optional dependency of the `zebra-network/tor` feature.
|
- **sqlite linker errors:** libsqlite3 is an optional dependency of the `zebra-network/tor` feature.
|
||||||
If you don't have it installed, you might see errors like `note: /usr/bin/ld: cannot find -lsqlite3`.
|
If you don't have it installed, you might see errors like `note: /usr/bin/ld: cannot find -lsqlite3`.
|
||||||
[Follow the arti instructions](https://gitlab.torproject.org/tpo/core/arti/-/blob/main/CONTRIBUTING.md#setting-up-your-development-environment)
|
[Follow the arti instructions](https://gitlab.torproject.org/tpo/core/arti/-/blob/main/CONTRIBUTING.md#setting-up-your-development-environment)
|
||||||
|
@ -25,19 +70,4 @@ cargo build
|
||||||
cargo build -p zebrad --all-features
|
cargo build -p zebrad --all-features
|
||||||
```
|
```
|
||||||
|
|
||||||
Compilers:
|
|
||||||
|
|
||||||
- **clang:** install both `libclang` and `clang` - they are usually different packages
|
|
||||||
- **libclang:** check out the [clang-sys documentation](https://github.com/KyleMayes/clang-sys#dependencies)
|
|
||||||
- **g++ or MSVC++:** try using clang or Xcode instead
|
|
||||||
- **rustc:** use rustc 1.65 or later
|
|
||||||
- Zebra does not have a minimum supported Rust version (MSRV) policy: any release can update the required Rust version.
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
Zebra primarily depends on pure Rust crates, and some Rust/C++ crates:
|
|
||||||
|
|
||||||
- [rocksdb](https://crates.io/crates/rocksdb)
|
|
||||||
- [zcash_script](https://crates.io/crates/zcash_script)
|
|
||||||
|
|
||||||
They will be automatically built along with `zebrad`.
|
|
||||||
|
|
|
@ -7,6 +7,13 @@ description = "The Zcash Foundation's independent, consensus-compatible implemen
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
repository = "https://github.com/ZcashFoundation/zebra"
|
repository = "https://github.com/ZcashFoundation/zebra"
|
||||||
|
|
||||||
|
readme = "../README.md"
|
||||||
|
homepage = "https://zfnd.org/zebra/"
|
||||||
|
# crates.io is limited to 5 keywords and categories
|
||||||
|
keywords = ["zebra", "zcash"]
|
||||||
|
# Must be one of <https://crates.io/category_slugs>
|
||||||
|
categories = ["command-line-utilities", "cryptography::cryptocurrencies"]
|
||||||
|
|
||||||
# Settings that impact compilation
|
# Settings that impact compilation
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
@ -20,12 +27,13 @@ rust-version = "1.66"
|
||||||
# when run in the workspace directory
|
# when run in the workspace directory
|
||||||
default-run = "zebrad"
|
default-run = "zebrad"
|
||||||
|
|
||||||
readme = "../README.md"
|
# `cargo release` settings
|
||||||
homepage = "https://zfnd.org/zebra/"
|
[metadata.release]
|
||||||
# crates.io is limited to 5 keywords and categories
|
pre-release-replacements = [
|
||||||
keywords = ["zebra", "zcash"]
|
{file="../book/src/user/install.md", search="git checkout [a-z0-9\\.-]+", replace="git checkout {{version}}"},
|
||||||
# Must be one of <https://crates.io/category_slugs>
|
{file="../book/src/user/install.md", search="--tag [a-z0-9\\.-]+", replace="--tag {{version}}"},
|
||||||
categories = ["command-line-utilities", "cryptography::cryptocurrencies"]
|
{file="../book/src/user/docker.md", search="--branch [a-z0-9\\.-]+", replace="--branch {{version}}"},
|
||||||
|
]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# In release builds, don't compile debug logging code, to improve performance.
|
# In release builds, don't compile debug logging code, to improve performance.
|
||||||
|
|
Loading…
Reference in New Issue