I created a huge testsuite based on c-testsuite for this project, and here are the results:
passed: 1292
failed: 248
The errors range from missing standard library functions or polyfill, to logic errors. Hopefully I can get all of these can get fixed very soon.
Also some huge speedups/optimizations came to the compiler itself, which is now 3x faster!
This tests all optimizations levels, and out-of-the-box compilation from pure C/ASM generated by gcc, this is not including any additional functions/standard library being given to the code.
This is a very interesting project, however I fail to see whether if this is meant to be a technical showcase/proof-of-concept (if so, does it belong in this category?) or some sort of external tooling like roblox-ts.
If youâre going for the latter; how do you plan on making these systems languages behave as a scripting language, even when itâs contrary to their core design? Though Iâm specifically interested in Rust â as it is designed to be memory safe without a GC, itâs quite hard to imagine how borrowchecking would work in the context of Roblox game behavior⌠Especially since this is an ASM â Luau transpiler, I donât see how you could even go for the latter.
Iâm asking this because even with roblox-ts, a great TS â Luau transpiler implementation; you can clearly feel that youâre writing code that isnât meant to be written in TypeScript, which is arguably the closest language to Luau right after Lua itself.
Not trying to criticize for the sake of it, just curious on where this project is headed.
This project is not intended to be something that you can write low level languages in Roblox for your games, but rather more of a porting tool.
This is tool replaces the assembler & linker step of a compiler and rather outputs functional Luau code that can be generated from any low level existing library.
Currently this does just serve as a proof of concept because of how it lacks ASM features and cannot compile from ELF files.
Once ELF file support is added you would either have the option to compile from an assembly file which would deliver more performance but abstract away system calls and have a smaller standard library, or a full binary that would lack performance but have full support of most programs.
Anything you would want, like how I am experimenting with porting DOOM to Robox using this project.
I donât expect anyone to use this in the next Steal a Brainrot, it does not have much value in games but could be very useful in studio plugins for bringing C/C++ tools into Roblox.
In GAS Assembly many pseudo instructions and specifically for the call instruction it allows me to replace instructions such as call printf with a pure Luau replica that can utilize string.format for example that would be much faster than compared to one from having standard library linked directly.
Also assembly in ELF files have no labels unlike plaintext assembly, so a step in the compiler is needed to create a control flow graph and detect blocks of code to simulate gotoâs.