https://github.com/jochumdev/luapack
Lua bundler with replace/vendor modes
https://github.com/jochumdev/luapack
Last synced: about 1 month ago
JSON representation
Lua bundler with replace/vendor modes
- Host: GitHub
- URL: https://github.com/jochumdev/luapack
- Owner: jochumdev
- License: mpl-2.0
- Created: 2025-11-23T07:38:56.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-11-23T10:16:54.000Z (7 months ago)
- Last Synced: 2025-11-23T11:22:44.364Z (7 months ago)
- Language: Rust
- Size: 49.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# luapack
> [!NOTE]
> For now this is a quick prototype that works for me.
Lua bundler with replace/vendor modes.
## Install
Download the latest binaries from the GitHub Releases page.
## Quickstart
Bundle the simple example:
```bash
luapack bundle examples/simple/lua/main.lua \
--lua "5.4" \
--path "examples/simple/lua/?.lua" \
--path "examples/simple/lua/?/init.lua" \
--vendor "examples/simple/vendor/lua/?.lua" \
--vendor "examples/simple/vendor/lua/?/init.lua" \
--output examples/simple/dist/simple_bundle.lua
```
Run it with your Lua:
```bash
lua examples/simple/dist/simple_bundle.lua
```
## Configuration (optional)
Auto-discovery in current directory, supports: `luapack.yaml`, `luapack.yml` and
`luapack.json` as well.
Add a minimal `luapack.toml`:
```toml
[bundle]
lua = "5.4"
paths = [
"lua/?.lua",
"lua/?/init.lua",
]
vendors = [
"vendor/lua/?.lua",
"vendor/lua/?/init.lua",
]
# redact_base = "lua/"
output = "dist/simple_bundle.lua"
diagnostics = true
```
Usage:
```bash
# from the directory containing luapack.toml
luapack bundle lua/main.lua
# or pass it explicitly from anywhere
luapack bundle examples/simple/lua/main.lua --config examples/simple/luapack.toml
```
## Docs
See [`doc/bundler.md`](doc/bundler.md) for a deeper overview.
## Credits
- [full_moon](https://github.com/Kampfkarren/full-moon) used for lua AST parsing
- [luabundler](https://github.com/Benjamin-Dobell/luabundler) inspired the
scoping approach
- [StyLua](https://github.com/JohnnyMorganz/StyLua) project structure,
best-practices and full_moon integration
## Authors
- [@jochumdev](https://github.com/jochumdev) with AI assistant.
## License
MPL-2.0