First, make sure rustup is installed.
Then, install the Risc Zero toolchain.
This example works with 1.0.1
version of the toolchain.
To build all methods and execute the method within the zkVM, run the following command:
make execute
or to prove:
make prove
External dependencies could be disabled by adding arguments to the CPPFLAGS environment variable.
The format is the following:
CPPFLAGS="-DNO_<lib_name>"
For example, to disable libsodium you can use the following command
CPPFLAGS="-DNO_SODIUM" make ...
Here is the list of libs with their macros:
libsodium = -DNO_SODIUM
libutf8proc = -DNO_UTF
First, make sure that submodules are installed.
git submodule update --init
Then, to build an external library use a corresponding bash script in the scripts
folder.
For example, to build libsodium, use the following script.
./scripts/build-sodium.sh
Built files will be placed at external/libs/<lib>/lib
and external/libs/<lib>/include
and commited to the git, so, possibly, you don't even need to build external dependencies since they are prebuilt.