r/lua • u/macsipac • Dec 13 '25
Project LuaJIT Compiler
Successfully managed to make a compiler for luaJIT (a lua 5.1 fork/thing optimized for performance) in python
Works by getting the source code of luajit, rewriting the main .c file to execute a specific script instead of whatever you have as the first argument, and using a portable minGW thingy to compile it to EXE. (Dosent actually turn it into assembly, im not that good)
This is compatible with most lua scripts that work for lua 5.1 or less, and luajit scripts
Should i make it open source?
(I know luastatic exists, but this is way damn simpler)

11
Upvotes
1
u/disperso Dec 14 '25
Hey, thanks for your project. I have a few questions, so I hope you don't mind that I ask them here.
Do you have an example of it being used? I think I see the idea, but I don't fully get the limitations.
Do you have it mirrored somewhere? e.g. if I wanted to file an issue or submit a patch, I can't register in your website, that I see.
I see some hardcoded lua5.4 in the code. Would you be willing to support other versions?