+++ title = "Installation" weight = 1 template = "tutorial/page.html" +++
Rue is currently in early development. To try it out, you'll need to build from source. If you do try it out, you'll certainly find bugs, and if you do please file them!
- Dotslash - Used to bootstrap Buck2 and the Rust toolchain
clang- Used as the system linker on platforms where the internal linker is not used
The repository includes everything else. Buck2 and the Rust toolchain are bootstrapped hermetically, and the first build downloads what it needs.
git clone https://github.com/rue-language/rue
cd rue
scripts/rue buildThe first build may take a minute. Subsequent builds are fast.
Try the checked-in setup smoke test:
scripts/rue exec examples/welcome.rueYou should see 1, 2, 3, and 42 printed, and the command exits 0 — so
you know your toolchain works even inside a script or CI step. scripts/rue exec
builds the compiler if needed, compiles the Rue source to a temporary
executable, and runs it, propagating the program's exit code. (In the next
chapter you'll see how a program's main return value becomes that exit code.)
When you want to keep the executable, ask the wrapper for the compiler path and run the compiler directly:
RUE="$(scripts/rue-bin)"
"$RUE" examples/welcome.rue -o welcome
./welcomeRue currently supports native code generation for x86-64-linux,
aarch64-linux, and aarch64-macos. Cross-target assembly and machine-code
emission are available, but producing an executable may require target-specific
system tools.
Most users should start with scripts/rue. If you're working on the compiler
itself, you may also see lower-level Buck2 commands such as:
./buck2 build root//crates/rue:rue
./buck2 test root//:spec-testsThe ./buck2 binary is also bootstrapped by Dotslash.
That's it! You now have a working Rue compiler. In the next chapter, we'll write our first program.