A multiple-target rush compiler backend using the LLVM framework and the Inkwell crate.
In order to compile the LLVM backend, please ensure that you have a valid LLVM installation on your machine. For further information and troubleshooting, please consult the llvm-sys crate's documentation as it is used by Inkwell.
- Prerequisite: A file ending in
.rush
which contains the program. - Execute following command as it will generate the
output.o
file from the source program.
cargo run your-file.rush
- Since rush programs depend on some sort of standard library, linking the
.o
file usinggcc
will likely result in a valid program. - In order to link the
output.o
alongside your system's C library, issue following command.
gcc output.o -o output
- Since the output of the previous command is a binary, it can be executed using the following command.
- The suffix containing
echo ...
is optional and merely prints out the program's exit-code.
./output ; echo $?