A command-line tool that compiles Lua programs into standalone executables that run without a Lua interpreter.
luastatic is a command-line tool that compiles Lua programs into standalone executable binaries. It solves the problem of distributing Lua applications to systems without a Lua interpreter by embedding the Lua runtime and dependencies into a single file. This eliminates runtime dependencies and simplifies deployment across different environments.
Lua developers who need to distribute their applications as portable executables, especially for systems where installing Lua is impractical or restricted.
Developers choose luastatic for its simplicity, support for multiple Lua versions including LuaJIT, and ability to create truly standalone executables without complex build systems. Its flexibility in handling static libraries and cross-compilation makes it a versatile tool for production deployments.
Build a standalone executable from a Lua program.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT, as shown in examples for different Lua installations, allowing developers to target specific interpreter versions seamlessly.
Enables building executables for platforms like Windows from Linux using cross-compilers like MinGW, demonstrated in the README with clear command-line examples.
Can embed static libraries for Lua binary modules directly into executables, ensuring all C dependencies are included, as seen in the library.a example for C extensions.
Allows generating intermediate C files without compilation by setting CC="", providing flexibility for debugging or integration into custom build processes, as noted in the usage section.
Requires developers to manually list all Lua source files and static libraries in the command line, which can be error-prone and tedious for projects with many dependencies, as evident from the complex usage syntax.
Depends on system C compilers and Lua static libraries being correctly installed and configured, adding setup complexity and potential portability issues across different systems, as highlighted in the cross-compilation examples.
While dynamic linking is possible with -llua flags, the tool is optimized for static linking, which may not suit environments where dynamic libraries are preferred for size or update flexibility, as implied by the focus on static libraries.