App Store: https://apps.apple.com/app/zingo/id1668209531
Google Play: https://play.google.com/store/apps/details?id=org.ZingoLabs.Zingo
- Yarn
- NodeJS (recommended version 17+)
- Rust (https://www.rust-lang.org/tools/install)
- Rustup iOS targets (
rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim
) - Cargo-lipo (
cargo install cargo-lipo
) - Cbindgen (
cargo install cbindgen
) - Cocaopods (
sudo gem install cocoapods
)
- In the
rust/ios
directory, run:
./build.sh
This step may take a long time. - From the root of the project, run:
yarn
- In the
ios
directory, run:
pod install
- In the
rust/ios
directory, run:
./buildsimulator.sh
This step may take a long time. - From the root of the project, run:
yarn
- In the
ios
directory, run:
pod install
- In a terminal, run:
yarn start
- In a separate terminal, run:
yarn ios
You can also open theios
directory in XCode and run it there.
-
Yarn
-
NodeJS (recommended version 17+)
-
Docker (Docker Engine)
-
OpenJDK 18 (https://jdk.java.net/archive/)
- curl https://download.java.net/java/GA/jdk18.0.2/f6ad4b4450fd4d298113270ec84f30ee/9/GPL/openjdk-18.0.2_linux-x64_bin.tar.gz -o openjdk-18.0.2_linux-x64_bin.tar.gz
- tar -xzvf openjdk-18.0.2_linux-x64_bin.tar.gz
-
Android SDK Command-line Tools
Install via Android Studio SDK Manager:
https://developer.android.com/studio/install
or as standalone:
https://developer.android.com/tools -
Cargo nextest (https://nexte.st/book/installing-from-source.html)
The React Native tools require some environment variables to be set up in order to build apps with
native code.
Add the following lines to your $HOME/.bash_profile
or $HOME/.profile
config file:
PATH="$PATH:$ANDROID_HOME/cmdline-tools/latest/bin"
PATH="$PATH:$ANDROID_HOME/platform-tools"
PATH="$PATH:$ANDROID_HOME/emulator"
Add the following lines to your $HOME/.bashrc
config file:
export ANDROID_SDK_ROOT="$HOME/Android/Sdk"
Also, make sure your JAVA_HOME is set, for example:
export JAVA_HOME="/usr/lib/jvm/jdk-18.0.2"
- In the
rust
directory, run:
./build.sh
This step may take a long time. - From the root of the project, run:
yarn
- For Android emulations, you can create a new AVD, compatible with your CPU architecture i.e. x86_64 (https://developer.android.com/studio/run/managing-avds). The recommended API is API 30 (Android 11). Alternatively, you can connect to a physical device (https://reactnative.dev/docs/running-on-device).
- In
File > Settings
, navigate toBuild, Execution and Deployment > Build Tools > Gradle
and check theGradle JDK
matches your JDK version. - In a terminal, run:
yarn start
- Open the
android
directory in Android Studio as a project, select 'app' and the previously created AVD in the upper toolbar and click the "Run 'app'" button. Alternatively, launch an AVD and in a separate terminal, run:
yarn android
You can also emulate android from the command line without using Android Studio.
- Check that the Android SDK cmdline-tools binaries are in the following directory path:
$ANDROID_HOME/cmdline-tools/latest/bin
- From the root directory run:
scripts/start_interactive.sh -a x86
Outputs are generated inandroid/app/build/outputs/emulator_output
Integration tests and end-to-end tests require a regtest server. On linux hosts, these may be run
locally by installing the lightwalletd, zcashd and zcash-cli binaries
(https://github.com/zingolabs/zingolib#regtest). From the rust/android/regtest/bin/
directory run:
ln -s path/to/lightwalletd/binary path/to/zcashd/binary path/to/zcash-cli/binary ./
From the rust/android/lightwalletd_bin
directory run:
ln -s path/to/lightwalletd/binary ./
Alternatively, integration tests and end-to-end tests can be run on non-linux hosts with Regchest
(https://github.com/zingolabs/zingo-regchest). Regchest manages the zcash/lightwalletd regtest
network in a docker container. Before running tests, pull the latest Regchest image from docker:
docker pull zingodevops/regchest:007
- From the root directory, run:
yarn test
- Create quick-boot snapshots to speed up AVD launch times. From the root directory, run:
./scripts/integration_tests.sh -a x86_64 -s
./scripts/integration_tests.sh -a x86 -s
By default, this uses Google Playstore API 30 system images. Other images may be used for testing by specifying the api level and target. However, using other images with the cargo test runner is still under development. - To run the integration tests. From the
rust
directory, run:
cargo nextest run -E 'not test(e2e)'
Specify to run specific ABI:
cargo nextest run x86_64
cargo nextest run x86_32
cargo nextest run arm64
cargo nextest run arm32
Specify to run a specific test on all ABIs:
cargo nextest run test_name
Specify to run a specific ABI and test:
cargo nextest run x86_64::test_name
To run tests with Regchest, add the --features regchest
flag, for example:
cargo nextest run --features regchest -E 'not test(e2e)'
For more information on running integration tests on non-default AVDs, run:
./scripts/integration_tests.sh -h
Without the cargo test runner these emulated android devices will not be able to connect to a
lightwalletd/zcashd regtest network. Therefore, only tests in the "Offline Testsuite" may be tested.
- Note there needs to be a lightwalletd in rust/android/lightwalletd_bin
- Launch the emulated AVD by clicking the 'play' icon in Android Studio's
Device Manager
. Alternatively, connect to a physical device. See previous section 'Launching the app' for more details. - In a terminal, run:
yarn start
- In a separate terminal, from the
rust
directory, run all tests:
cargo nextest run e2e
or run a specific test:
cargo nextest run e2e::test_name
Regchest is still under development and currently not able to run darkside end-to-end tests:
cargo nextest run --features regchest -E 'test(e2e) and not test(darkside)'
For notes on known issues and problems, see the trouble-shooting notes.