Fast Interpreter in Rust

The brilirs directory contains a fast Bril interpreter written in Rust. It is a drop-in replacement for the reference interpreter that prioritizes speed over completeness and hacakability. It implements core Bril and the SSA, memory, and floating point extensions.

Read more about the implementation, which is originally by Wil Thomason and Daniel Glus.


To use brilirs you will need to install Rust and add the nightly channel with rustup toolchain install nightly. Use echo $PATH to check that $HOME/.cargo/bin is on your path.

In the brilirs directory, build the interpreter with:

cargo +nightly install --path .

Run a program by piping a JSON Bril program into it:

bril2json < myprogram.bril | brilirs

Similar to type-infer, brilirs can be used to typecheck and validate your Bril JSON program by passing the --check flag (similar to cargo --check).