Herbie supports Linux, macOS, and Windows. It can be installed from a package or from source. To start, install Racket, which Herbie is written in. Install Rust when building from source. (Herbie is also available as a Docker image.)
Install Racket either using the official installer or distro-provided packages. Versions as old as 8.0 are supported, but more recent versions are faster.
Test that Racket is installed correctly and has a correct version:
racket Welcome to Racket v8.5 [cs]. > (exit)
Install Rust, using rustup or via some other means. Versions as old as 1.60.0 are supported. This installation method supports Windows, macOS, and Linux for various architectures.
Once Racket and Rust are installed, download the Herbie source from GitHub with:
git clone https://github.com/uwplse/herbie
Change to the herbie
directory;
you should see a README.md
file, a directory named src
,
a directory named bench/
, and a few other directories.
Install Herbie on your system with:
make install
This command installs Herbie and its dependencies, compiles it for
faster startup, and places the herbie
executable in
your Racket user path (example paths for Racket 8.5):
AppData\Roaming\Racket\8.5\bin
in your user folder.Library/Racket/8.5/bin
in your home folder..local/share/racket/8.5/bin
in your home directory.
You can run herbie
from that directory, or add it to
your executable path. Once Herbie is installed and working
correctly, check out the tutorial.
This installation method supports Windows, macOS, and Linux for x86-64. This method of installation will fail for Apple M1 systems and other ARM architectures. Once Racket is installed, install Herbie from a package with:
raco pkg install --auto herbie
This command installs Herbie and its dependencies, compiles it for
faster startup, and places the herbie
executable in
your Racket user path (example paths for Racket 8.1):
AppData\Roaming\Racket\8.5\bin
in your user folder.Library/Racket/8.5/bin
in your home folder..local/share/racket/8.5/bin
in your home directory.
You can run herbie
from that directory, or add it to
your executable path. Once Herbie is installed and working
correctly, check out the tutorial.
Docker is a container manager, which is sort of like an easily-scriptable virtual machine. Herbie in Docker is more limited; we do not recommend using Herbie through Docker without prior Docker experience.
The Docker documentation describes how
to install and run the official uwplse/herbie
image.