r/lua • u/AnatineSquire40 • Jun 08 '26
Lua runtime + packager system (.lar) — ZIP-based execution with custom module loader
I made a Lua runtime and packaging system called Lua ARchive (lar).
It lets you package Lua projects into .lar files (ZIP-based archives) and run them directly using a custom runtime, without extracting files.
GitHub: https://github.com/anatinesquire40/Lua-ARchive
What it does
- Packages Lua projects into
.lar(ZIP container) - Executes directly from inside the archive
- Custom module loader integrated into Lua (
package.searchersoverride) - Dependency system between
.lararchives - Virtual filesystem for assets inside archives
- Streaming asset API (read / seek / lines)
- Manifest-based entrypoint system
- Lua bytecode compilation during build
Basic usage
lar --build gameproject -o game.lar
lar game.larHow it works internally
The runtime:
- loads the
.lararchive - resolves modules using a custom searcher
- loads dependencies as nested archives
- mounts a virtual filesystem for assets
- executes the entrypoint defined in the manifest
It’s basically a Lua runtime with a built-in packaging + module + asset system on top of ZIP archives.
Feedback is welcome, especially on design decisions or potential issues with the architecture.
16
Upvotes
View all comments
Show parent comment
2
u/Spacedestructor Jun 09 '26
i have no C++ experience, so i dont know how good code is supposed to look like.
but to me it just looks generic but not necessairly ai.
some of these checks and stuff even looks like something i have written in lua equivalents many times.
hard to tell if its ai unless someone looks at it who is actually experienced in c++ and know how ai code looks like.