Skip to content
Jan Špaček edited this page Apr 12, 2016 · 4 revisions

There are a few prerequisites needed to compile the compiler and the runtime.

  • The Rust compiler to compile the compiler. You will need to install the nightly version, as the compiler requires unstable Rust features.
  • Clang to compile the runtime, and
  • Tup to orchestrate the build.

To build the Spiral compiler, run

cargo build

from the root directory. This command will place the Spiral compiler into target/debug/spiral. To build the runtime, use

tup init
tup

inside the directory rt. The runtime is compiled as a static library rt/build/runtime_debug.a (slow, good for debugging) or rt/build/runtime_fast.a (fast, impressive for family and friends).

To run the tests of the language and the standard library, execute

./tests/run.sh

If there are some errors, it is a bug. However, if it fails magnificiently, something probably went wrong during installation or build.