Installing Herbie

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. (Herbie is also available as a Docker image.)

Installing Racket

Install Racket, version 7.0 or later, either using the official installer or distro-provided packages. Versions 7.5 and later are significantly faster, and we recommend upgrading.

Test that Racket is installed correctly and has a correct version:

racket
Welcome to Racket v7.7.
> (exit)

Installing Herbie from a package

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 7.7):

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.

Installing Herbie from source

Once Racket is 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:

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.

Installing Herbie with Docker

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.