Compiler Guide

RUDRA ships two front-end commands: rudrac, the compiler, and rudra, the project driver.

rudrac

CommandEffect
rudrac file.ruxCompile to a native binary
rudrac file.rux -o nameCompile and set the output name
rudrac file.rux --runCompile and run immediately
rudrac --versionShow the compiler version
rudrac hello.rux --run
rudrac hello.rux -o hello

rudra driver

CommandEffect
rudra new <name>Create a new project
rudra run [file]Compile and run (default: src/main.rux)
rudra build [file]Compile into a native binary
rudra check [file]Type-check without building
rudra cleanClean the build folder
rudra doctorRun an environment check
rudra versionShow the version

Type checking

The compiler reports type errors before building. For example, calling len on an array reports a type error, because len operates on strings.