2020-08-06 15:39:54 -07:00
|
|
|
# Installing Zebra
|
|
|
|
|
2021-10-29 12:25:30 -07:00
|
|
|
`zebrad` is still under development, so there is no supported packaging or
|
|
|
|
install mechanism. To run `zebrad`, follow the instructions to compile `zebrad`
|
|
|
|
for your platform:
|
|
|
|
|
|
|
|
1. Install [`cargo` and `rustc`](https://www.rust-lang.org/tools/install).
|
|
|
|
- Using `rustup` installs the stable Rust toolchain, which `zebrad` targets.
|
|
|
|
2. Install Zebra's build dependencies:
|
|
|
|
- **libclang:** the `libclang`, `libclang-dev`, `llvm`, or `llvm-dev` packages, depending on your package manager
|
|
|
|
- **clang** or another C++ compiler: `g++`, `Xcode`, or `MSVC`
|
2022-04-18 20:02:17 -07:00
|
|
|
3. Run `cargo install --locked --git https://github.com/ZcashFoundation/zebra --tag v1.0.0-beta.8 zebrad`
|
2021-10-29 12:25:30 -07:00
|
|
|
4. Run `zebrad start` (see [Running Zebra](user/run.md) for more information)
|
|
|
|
|
|
|
|
If you're interested in testing out `zebrad` please feel free, but keep in mind
|
|
|
|
that there is a lot of key functionality still missing.
|
|
|
|
|
|
|
|
#### Build Troubleshooting
|
|
|
|
|
|
|
|
If you're having trouble with:
|
2022-03-08 01:14:03 -08:00
|
|
|
|
|
|
|
Dependencies:
|
|
|
|
- use `cargo install` without `--locked` to build with the latest versions of each dependency
|
|
|
|
- **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`.
|
|
|
|
[Follow the arti instructions](https://gitlab.torproject.org/tpo/core/arti/-/blob/main/CONTRIBUTING.md#setting-up-your-development-environment)
|
|
|
|
to install libsqlite3, or use one of these commands instead:
|
|
|
|
```sh
|
|
|
|
cargo build
|
|
|
|
cargo build -p zebrad --all-features
|
|
|
|
```
|
|
|
|
|
|
|
|
Compilers:
|
|
|
|
- **clang:** install both `libclang` and `clang` - they are usually different packages
|
2021-10-29 12:25:30 -07:00
|
|
|
- **libclang:** check out the [clang-sys documentation](https://github.com/KyleMayes/clang-sys#dependencies)
|
|
|
|
- **g++ or MSVC++:** try using clang or Xcode instead
|
2022-03-08 01:14:03 -08:00
|
|
|
- **rustc:** use rustc 1.58 or later
|
2021-10-29 12:25:30 -07:00
|
|
|
- Zebra does not have a minimum supported Rust version (MSRV) policy yet
|
|
|
|
|
2022-03-08 01:14:03 -08:00
|
|
|
|
2021-10-29 12:25:30 -07:00
|
|
|
### 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`.
|