Rust/Linux
Quick start tutorial for installing the Rust/Linux binding of the zkpass-client library, and building and running the sample application.
System Requirements
Ubuntu version 20 or higher WSL (Windows Subsystem for Linux) is also supported. Other similar Linux distros should also work.
For WSL installation guide, read here.
Some APT package dependencies Run the following to install the required packages:
Rust compiler toolchain Follow this 2-step instruction to install the Rust toolchain.
Installing the SDK and Run zkpass-demo
Follow these steps to install the zkPass SDK and to run the demo application.
For the purposes of this guide, the zkpass-sdk
repository is cloned under the home directory of the current user, retaining its default name. This places the root directory for the zkpass-sdk
repository at ~/zkpass-sdk
. As a result, the directory for the Rust/Linux binding of the SDK is set at ~/zkpass-sdk/rust
.
Should you choose to clone the zkpass-sdk
repository into a different location, ensure that you adjust any referenced paths in the instructions to match your chosen directory structure.
Clone the zkpass-sdk repo
Enter
zkpass-sdk/rust
Directory
From the
zkpass-sdk/rust
directory, executetest.sh
script to build the SDK and run the demo application:
The correct output of zkpass-demo should look like the following:
Troubleshooting
Fetch Timeout
This error is indicated by the error message "reqwest::Error ... source: TimedOut"
.
This could happen when the demo runs and fails to fetch several keys needed. Here are several solutions:
Make sure you have a stable internet connection when running the script
Turn off any of your VPN and try again
Missing/Corrupt .so Files
This error is indicated by the error message "libr0_zkpass_query.so: cannot open shared object file: No such file or directory"
.
This may be caused by missing or corrupt .so files after executing cargo build -r
command in the test.sh
script. Several solutions:
Make sure you have a stable internet connection when running the script
Turn off any of your VPN and try again
Download .so file manually
Download
libsp1_zkpass_query.so
andlibr0_zkpass_query.so
file from the website.Move these files to
zkpass-sdk/rust/lib
folderRun the
test.sh
script, error should be resolved
Last updated