Setting up your development environment
Conjure Oxide supports Linux and Mac.
Windows users should install WSL and follow the Linux (Ubuntu) instructions below:
Linux (Debian/Ubuntu)
The following software is required:
- The latest version of stable Rust, installed using rustup.
- A C/C++ compilation toolchain and libraries:
- Debian, Ubuntu and derivatives:
sudo apt install build-essential libclang-dev - Fedora:
sudo dnf group install c-developmentandsudo dnf install clang-devel
- Debian, Ubuntu and derivatives:
- Conjure.
- Ensure that Conjure is placed early in your PATH to avoid conflicts with ImageMagick’s
conjurecommand!
- Ensure that Conjure is placed early in your PATH to avoid conflicts with ImageMagick’s
- Z3, one of the solver backends, requires a separate install. Using a package installer (e.g.
apt), install Z3.
MacOS
The following software is required:
- the latest version of stable Rust, installed using rustup.
- an XCode Command Line Tools installation (installable using
xcode-select --install) - CMake:
brew install cmake(for SAT solving) - Conjure.
- Z3, one of the solver backends, requires a separate install. Using a package installer, install Z3 (e.g. for
Homebrewrunbrew install z3).
If you are having issues with Z3, you may need to update
~/.cargo/config.tomlto ensure theZ3_LIBRARY_PATH_OVERRIDEandZ3_SYS_Z3_HEADERenvironment variables are pointed to the right library path andz3.hfile that you installed.
St Andrews CS Linux Systems
-
Download and install the pre-built binaries for Conjure. Place these in
/cs/home/<username>/usr/binor elsewhere in your$PATH. -
Install
rustupand the latest version of Rust throughrustup. The school provided Rust version does not work.- By default,
rustupinstalls to your local home directory; therefore, you may need to re-installrustupand Rust after restarting a machine or when using a new lab PC.
- By default,
-
Install
z3, one of the solver backends. You may have to build it from source, and then add the binary to your path.
To add a binary to your PATH in a way that persists every time you log out, run:
mkdir -p /cs/home/$USER/.paths.d`
echo ~/Documents/... > /cs/home/$USER/.paths.d/z3
// where the "..." is the path to your compiled z3 binary
Improving Compilation Speed
Installing sccache improves compilation speeds of this project by caching crates and C/C++ dependencies system-wide.
- Install sccache and follow the setup instructions for Rust. Minion detects and uses sccache out of the box, so no C++ specific installation steps are required.
This section had been taken from the ‘Setting up your development environment’ page of the conjure-oxide wiki