Troubleshooting

Solutions to common issues when installing and using the toolchain. Every message below was produced by the shipped 1.1.0 compiler.

ruxc: command not found

The install directory is not on your PATH. The Linux installer places binaries in ~/.local/bin by default. Add it to your PATH and open a new terminal. There is no rudra version command in this release; to check the install, compile and run hello.rux.

export PATH="$HOME/.local/bin:$PATH"
ruxc share/rudra/examples/hello.rux hello && ./hello

My program compiles but prints nothing

Top-level statements are what run. A file containing only fn main() {...} prints nothing. End the file with return main();, and have main declared as fn main() -> int returning a value; that value becomes the exit status.

ERROR import module not found

ruxc resolves import "name"; only from the directory of the source file. For std modules, compile with rudra file.rux output, which copies the std library next to a temporary copy of your source. For your own modules, keep the file beside the source.

TYPE print expects a string argument

print takes only a str. Convert numbers first: print(to_str(n) + "\n");.

CODEGEN unknown function

You called a function that does not exist, such as the built-in len (use str_len for strings and list_len for lists) or an unimported std function. Check the spelling and add the needed import.

ERROR non-exhaustive match

A match over an enum must cover every variant, or end with a _ wildcard arm. Add the missing variants.

Program exits with status 134

Division or modulo by zero, and out-of-range list access, abort the program with exit status 134. Lists are also capped at 512 elements.

rudra new, rudra run or rudra version is not recognised

These commands are not part of the 1.1.0 release. A newer driver with build, run, check and version exists in the source repository but has not been released. Use ruxc file.rux output or rudra file.rux output, then run ./output.

Checksum does not match

Re-download the asset and verify again. Do not install an archive whose SHA256 does not match the value on the Downloads page.