Compiler Guide
RUDRA ships two front-end commands: rudrac, the compiler, and rudra, the project driver.
rudrac
| Command | Effect |
|---|---|
rudrac file.rux | Compile to a native binary |
rudrac file.rux -o name | Compile and set the output name |
rudrac file.rux --run | Compile and run immediately |
rudrac --version | Show the compiler version |
rudrac hello.rux --run
rudrac hello.rux -o hello rudra driver
| Command | Effect |
|---|---|
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 clean | Clean the build folder |
rudra doctor | Run an environment check |
rudra version | Show 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.