Running Code
System Requirements
Ubuntu version 20 or higher WSL (Windows Subsystem for Linux) is also supported. Other similar Linux distros should also work.
Some APT package dependencies Run the following to install the required packages:
sudo apt install build-essential
sudo apt install pkg-config
sudo apt install libssl-devRust compiler toolchain Follow this 2-step instruction to install the Rust toolchain.
# 1: install cargo toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y# 2: source the cargo env for the first time
source "$HOME/.cargo/env"Installing the SDK and Run zkpass-demo
Follow these steps to install the zkPass SDK and to run the demo application.
Clone the zkpass-sdk repo
Enter
zkpass-sdk/rustDirectory
Set up environment variables (Use zkpass-demo/.env.example as starting point)
From the
zkpass-sdk/rustdirectory, executetest.shscript to build the SDK and run the demo application:
The correct output of zkpass-demo should look like the following:
Troubleshooting
Fetch Timeout
This demo will download a binary file. If the download process times out, try the following solutions:
Ensure you have a stable internet connection when running the script.
Turn off any active VPNs and try again.
Missing/Corrupt .so Files
The error message "cannot open shared object file: No such file or directory" indicates an issue. This may occur due to missing or corrupted .so. Here are some possible solutions:
Ensure you have a stable internet connection when running the script.
Turn off any active VPNs and try again.
Manually download the .so file:
Download
libdvr_client.sofile from the website.Move these files to
zkpass-sdk/rust/libfolder.Comment out
download-so.shintest.shscript.Run the
test.shscript again; the error should be resolved.
Last updated