Why convert LUA to EXE?
Distributing a .lua script to users without a Lua installation requires bundling the runtime with the script. Packaging to .exe presents the tool as a normal Windows application and removes any dependency on Lua being installed on the target machine.
How to convert LUA to EXE
srlua FREE
Run glue.exe lua.exe yourscript.lua output.exe to bundle the script with a stripped Lua runtime into a self-contained .exe. Scripts that require native C libraries still need those .dll files placed alongside the executable.
luastatic FREE
Run luastatic yourscript.lua liblua.a -I/path/to/lua/include to statically link the script and its Lua dependencies into a native executable. Requires LuaRocks and a C compiler such as MinGW.
About these formats
A LUA file is source code written in Lua, a lightweight scripting language created in 1993. Any code editor (VS Code, Notepad++) opens it for reading or editing. To run it you need the Lua…
Open .LUA details →An EXE file is a Windows executable program. On Windows, double-click it to run. On Mac or Linux, use CrossOver or Wine - EXEs don't run natively outside Windows. EXE is the most common…
Open .EXE details →Quality & what to watch
- srlua embeds the original Lua source inside the
.exe; the script can be extracted with a hex editor. luastatic compiles to native code and is harder to reverse, though not impossible. - External Lua modules and native
.dllfiles are not bundled automatically by srlua and must be distributed alongside the.exe. - luastatic on Linux or macOS produces an ELF or Mach-O binary, not a
.exe. Build on the target platform to get the correct binary type.
Frequently asked questions
Does the target machine need Lua installed to run the .exe?
What is the difference between srlua and luastatic?
Can I bundle a script that uses external libraries?
.dll files to be placed next to the .exe.