If you use Ubuntu, you can install Regent by running:

sudo apt-get install clang-3.5 libclang-3.5-dev llvm-3.5-dev
git clone -b master
cd legion/language
./ --debug

Complete instructions for installation follow below.

Regent is also available as a Docker container. See the bottom of this page for instructions.


Regent requires:

  • Linux, macOS, or another Unix
  • A C++ 98 (or newer) compiler (GCC, Clang, Intel, or PGI) and GNU Make
  • Python 2.7 (or 3.x)
  • LLVM and Clang 3.5 with headers
    • Versions 3.6-3.9 also work, but may be missing debug symbols in generated code

There are also a number of optional dependencies. For most users, we recommend skipping these initially and installing them later on an as-needed basis.


Regent includes a self-installer which downloads Terra and builds the Regent compiler. Run:

git clone -b master
cd legion/language
./ --debug

For other installation options (including multi-node and GPU configurations), see the README.


Regent includes a frontend interpreter which can be run with:

./ <script>

For example:

./ examples/circuit.rg

(Note: The Regent frontend can also be run without arguments to obtain a Terra/LuaJIT shell. However, this mode is not very useful because of the way that Terra language extensions works. Also, the Legion runtime is not currently reentrant, making interactive use difficult.)


If you have Docker, Regent is also available as a container:

docker run -ti stanfordlegion/regent

This will start a bash shell from which you can run Regent. Regent is installed under /usr/local/legion. So for example, to run the circuit example:

regent /usr/local/legion/language/examples/circuit.rg

Because Docker containers have no access to the host file system, some additional options are required if you want to run Docker on your own Regent files. The command below mounts the current directory in the host as /examples in the container and then runs Regent on it.

docker run -ti -v $PWD:/examples stanfordlegion/regent regent /examples/circuit.rg