-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed hardcoded rust version (#73) * Removed hardcoded rust version * Fixed typo in readme.md and build.md * Updated dependency and version to 0.4.0 (#74) * Updated dependency * New version * Remove fixed dependencies (#67) --------- Co-authored-by: nicholas-mainardi <[email protected]>
- Loading branch information
1 parent
273e699
commit 7a14963
Showing
8 changed files
with
160 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
# Build guide | ||
|
||
The library compiles on the `1.51.0 stable` toolchain of the Rust compiler. To install Rust, first install `rustup` by following the instructions [here](https://rustup.rs/), or via your platform's package manager. Once `rustup` is installed, install the appropriate Rust toolchain by invoking: | ||
```bash | ||
rustup install 1.51.0 | ||
``` | ||
The library compiles on the `stable` Rust toolchain. | ||
To install Rust, just install `rustup` by following the instructions [here](https://rustup.rs/), or via your platform's package manager. | ||
|
||
After that, use `cargo`, the standard Rust build tool, to build the library: | ||
|
||
```bash | ||
git clone https://github.com/HorizenOfficial/zendoo-mc-cryptolib.git | ||
cd zendoo-mc-cryptolib | ||
cargo build --release | ||
``` | ||
|
||
This library comes with unit tests for each of the provided crates. Run the tests with: | ||
|
||
```bash | ||
cargo test --all-features | ||
``` | ||
|
||
Compiling with `adcxq`, `adoxq` and `mulxq` instructions can lead to a 30-70% speedup. These are available on most `x86_64` platforms (Broadwell onwards for Intel and Ryzen onwards for AMD). Run the following command: | ||
|
||
```bash | ||
RUSTFLAGS="-C target-feature=+bmi2,+adx" cargo test/build/bench --features asm | ||
``` | ||
|
||
Tip: If optimising for performance, your mileage may vary with passing `--emit=asm` to `RUSTFLAGS`. |
Oops, something went wrong.