There are two ways to package .lua scripts into binaries: the traditional srlua, which concatenates the Lua interpreter with the code, and the more modern luastatic, which performs real compilation. However, each of them has its own problems:
-
- Can only package a single
.luafile - Requires manual compilation
- Can only package a single
-
- Requires a build environment
- Linux-only
luainstaller is an open-source Python library that wraps precompiled srlua and provides support for luastatic. It can be used as a command-line tool, a graphical application, or via a Python library API, and includes dependency analysis and a single-file packaging engine. It works out of the box on both Windows and Linux.

Usage is very simple. Suppose you have an entry script a.lua; a.lua depends on b.lua, b.lua depends on c.lua, and so on.
You do not need to manually compile srlua (or configure a luastatic environment), manually analyze dependencies, merge all code into a single .lua script (for srlua), and then invoke srlua or luastatic. You only need:
pip install luainstaller
Then
luainstaller build a.lua
And that’s it.
You do not even need to type commands in the terminal:
luainstaller-gui
This will launch a Tkinter-based graphical interface that includes the basic functionality.
luainstaller also supports more parameters and features, including a logging system (recorded using SimpSave), selectable engines, and more.
Refer to the detailed documentation on GitHub for complete usage instructions. If you find the project helpful, consider giving it a Star to show your support :-)

Top comments (0)