Compiler Guide

The RUDRA 1.1.0 release ships two commands: ruxc, the self-hosted compiler, and rudra, a small shell wrapper around it.

ruxc

ruxc is a static x86-64 Linux ELF written in RUDRA itself, with no runtime dependencies. Imports resolve only from the directory of the source file.

CommandEffect
ruxc file.rux outputCompile to a native executable named output
./outputRun it; the exit status is the return value of main
ruxc hello.rux hello
./hello

rudra wrapper

rudra file.rux output copies the standard library next to a temporary copy of your source and then compiles it. Use it when your program imports std modules.

CommandEffect
rudra file.rux outputCompile with the std library available for import

The release does not include rudrac, --run, -o, --version, or the subcommands rudra new, run, build, check, clean, doctor and version. A new RUDRA-written driver (rudra build/run/check/version) exists in the source repository but is not yet released.

Type checking

The compiler reports type errors and refuses to produce a binary. For example, let x: int = "a"; fails with TYPE mismatch and exit status 1.