This is a project to compile LLVM IR to Roblox Luau.
$ rbxllc <input.ll> -o <output.lua>-o <output.lua>: Output file-vor--version: Print version information-s: generate code that is buffer-overflow strict. This will make the generated code slower, larger, and less readable but can fix programs that depend on buffer overflow behavior.-nb: use Luau 5.4 operaters instead of thebit32library.-cbuff: generated code will not expose functions from the Luaubuffer.-cbit: generated code will not expose functions from the Luaubit32.
- LLVM 14 (no higher)
pip install llvmlite- python3 You can install prebuilt binaries from the releases page.
- Compile test.c to test.ll using clang:
$ clang -S -emit-llvm test/test.c -o test/test.ll- Compile test.ll to test.lua using rbxllc:
$ rbxllc test/test.ll -o test/test.lua- Run test.lua using luau:
$ luau test.lua
Hello, World!