Building

Once the development setup is complete, Prusti can be compiled. Using the Python wrapper script:

$ ./x.py build

The script will set the following environment variables if they are not already set, before running cargo build:

VariableDefault valueDescription
JAVA_HOMEDetected based on OS.Java JDK location.
RUST_TEST_THREADS1Limits the number of threads used for running tests.
LD_LIBRARY_PATH (and DYLD_LIBRARY_PATH on macOS)Detected inside JAVA_HOMEPath containing libjvm.so (libjvm.dylib on macOS).
VIPER_HOMEviper_tools/backendsPath containing silicon.jar, carbon.jar, and various supporting Java libraries.
Z3_EXE(VIPER_HOME)/../z3/bin/z3Path to the z3 solver executable.

Any additional arguments are added to the cargo build command line. For example:

$ ./x.py build --all --verbose

Verbose mode

To see which environment variables ./x.py is setting, the ++verbose flag can be passed on the command line before the cargo command:

./x.py ++verbose build