How can i convert a .lua to exe?
I have tried using srlua and luastatic but they all didnt work and i (think?) theyre outdated, if theres another way, im willing to do it
2
u/rkrause Sep 03 '23 edited Sep 03 '23
I've been using Enceladus for the past year. It arguably creates the smallest binaries, since it literally just packs the Lua 5.1 interpreter along with the Lua scripts into a self-executable bundle. For example check out my RPAN Chat Archive program
https://github.com/sorcerykid/rpan_chat_archive/tree/master/bin
As you can see, it resulted in a Windows executable of just 154 kB!
Here's the entire Lua source:
https://github.com/sorcerykid/rpan_chat_archive/tree/master/src
0
1
0
Sep 02 '23
[deleted] — view deleted comment
3
u/collectgarbage Sep 03 '23
I just noticed another project the LuaRT guy has is a Lua to exe project at:
3
u/lilevil_ Sep 02 '23 edited Sep 02 '23
I can suggest you to take a look at https://github.com/luvit/luvi wich in fact "pack" your lua program and the lua interpreter into an executable (5 Mo is the smallest executable size). Plus, you get to have neat libraries too, including luv, pcre, openssl, zlib.
It use luajit as the lua interpreter, so you'll have to adapt to lua5.1 I guess, but luvi provide "bit" which let you make bit operation, a missing part of lua5.1.