https://github.com/thislight/luabundler
Bundle your Lua porgram and its C dependencies into one executable.
https://github.com/thislight/luabundler
lua lua54 luarocks
Last synced: 10 months ago
JSON representation
Bundle your Lua porgram and its C dependencies into one executable.
- Host: GitHub
- URL: https://github.com/thislight/luabundler
- Owner: thislight
- License: apache-2.0
- Created: 2023-02-28T10:00:07.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T12:18:46.000Z (almost 3 years ago)
- Last Synced: 2025-02-12T20:37:49.607Z (12 months ago)
- Topics: lua, lua54, luarocks
- Language: Lua
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
LuaBundler is your escape from the dependency nightmare: it bundles your Lua program and its C dependencies into a single executable.
## Why LuaBundler?
- **Portable.** Requires only the C11 compiler and Lua interpreter.
- **C dependencies.** LuaBundler can help you bundle the C dependencies.
- **Dynamic linking support.** LuaBundler doesn't force you to bundle everything. You can choose what you want to bundle.
## How it works
Reading from your recipe, LuaBundler will bundle all the Lua files into one `.c` source file, referencing the open functions (`luaopen_*`) of the C modules. And LuaBundler can help you compile the file, link (dynamically or statically) the C modules (even the dependencies of the C modules).
You get the executable.
When the executable is started, the LuaBundler runtime creates a new Lua interpreter, injects the bundle module searcher and calls the entry point function. If the code calls `require()` and the module is not imported, `require()` will use the searcher to look for bundled modules.
## Limitation
- Supported Lua version(s): Lua 5.4
- Versioned C modules are not supported. (which the module name has hyphens, like "a.b.c-v2")
## Getting started
- [User Manual](./docs/manual.md)
- [Bootstraping LuaBundler](./docs/bootstrap.md)
## License
SPDX: Apache-2.0