- Install Docker or Podman.
- Install
libudev-dev
(dpkg) orlibudev-devel
(rpm) package. - Install protobuf compiler, so
protoc
is available in your PATH. - Download ZCash params files: Windows, Unix/Linux
- Create
.env.client
file with the following contentALICE_PASSPHRASE=spice describe gravity federal blast come thank unfair canal monkey style afraid
- Create
.env.seed
file with the following contentBOB_PASSPHRASE=also shoot benefit prefer juice shell elder veteran woman mimic image kidney
- MacOS specific: run script (required after each reboot)
Please note that you have to run it again after each reboot
#!/bin/bash for ((i=2;i<256;i++)) do sudo ifconfig lo0 alias 127.0.0.$i up done sudo ifconfig lo0 inet6 -alias ::1 sudo ifconfig lo0 inet6 -alias fe80::1%lo0
- Linux specific:
- for Docker users:
sudo groupadd docker sudo usermod -aG docker $USER
- for Podman users:
sudo ln -s $(which podman) /usr/bin/docker
- for Docker users:
- Try
cargo test --all --features run-docker-tests -- --test-threads=16
.
- Set up WASM Build Environment
- Install Firefox.
- Download Gecko driver for your OS
- Set environment variables required to run WASM tests
# wasm-bindgen specific variables export WASM_BINDGEN_TEST_TIMEOUT=180 export GECKODRIVER=PATH_TO_GECKO_DRIVER_BIN # MarketMaker specific variables export BOB_PASSPHRASE="also shoot benefit prefer juice shell elder veteran woman mimic image kidney" export ALICE_PASSPHRASE="spice describe gravity federal blast come thank unfair canal monkey style afraid"
- Run WASM tests
- for Linux users:
wasm-pack test --firefox --headless mm2src/mm2_main
- for OSX users (Intel):
CC=/usr/local/opt/llvm/bin/clang AR=/usr/local/opt/llvm/bin/llvm-ar wasm-pack test --firefox --headless mm2src/mm2_main
- for OSX users (Apple Silicon):
Please noteCC=/opt/homebrew/opt/llvm/bin/clang AR=/opt/homebrew/opt/llvm/bin/llvm-ar wasm-pack test --firefox --headless mm2src/mm2_main
CC
andAR
must be specified in the same line aswasm-pack test mm2src/mm2_main
.
- Install
wasm-bindgen-cli
:
Make sure you have wasm-bindgen-cli installed with a version that matches the one specified in your Cargo.toml file. You can install it using Cargo with the following command:cargo install -f wasm-bindgen-cli --version <wasm-bindgen-version>
- Run
cargo test --target wasm32-unknown-unknown --package coins --lib utxo::utxo_block_header_storage::wasm::indexeddb_block_header_storage
PS If you notice that this guide is outdated, please submit a PR.