Rustic Rust Compiler (rrc
) is a Rust to LLVM-IR compiler.
To build the compiler, run the following command:
cargo build
To run the compiler, run the following command:
target/debug/rrc --input "tests/_example/return_0.rs" --output "./return_0.ll"
This can be ran locally using LLVM and Clang. Run the following command:
# Use LLVM to compile to assembly
llc "./return_0.ll"
# Use Clang (or GCC) to compile to bytecode
clang return_0.s
# Run the program
./a.out
# (Optional) Check the return code
echo $?
See docs/README.md
Licensed under MIT.
See LICENSE
for details.