r/lua • u/Empty_Salamander_183 • 50m ago
r/lua • u/wak6817-2 • 59m ago
Project i made a backup utility in lua
github.comleave some feature requests if ya want
okthxbye
Project Title: JITLua 1.0.0: a LuaJIT 2.1 fork with Lua 5.4.9 semantics (Linux arm64/x86_64 only)
Built by LLM coding agents under human direction; details below.
JITLua-5.4 1.0.0 is a fork of LuaJIT 2.1 that runs the Lua 5.4.9 language and C API on LuaJIT's JIT compiler. It is not an official LuaJIT release and Mike Pall does not support it. It is not a drop-in replacement for stock LuaJIT, and it is not binary-compatible with PUC Lua.
What works: 64-bit integers next to floats, // and the bitwise operators, 5.4 for loop rules, goto, <const>/<close>, coroutine.close, __gc on tables, and the 5.4 standard library. LuaJIT's FFI, jit.* and bit.* are kept. The C API is source-compatible with PUC 5.4, so C modules must be rebuilt against JITLua's headers. A module built against PUC's headers that calls luaL_checkversion is refused at load.
Platforms: Linux arm64 and Linux x86_64 (GC64) only. The other LuaJIT backends do not build with the 5.4 changes. Windows and macOS are untested.
Verification: It is compared against PUC Lua 5.4.9 with a differential harness, with identical results on both architectures. The PUC test suite plus an edge-case corpus gives 696 PASS / 0 FAIL / 14 XFAIL / 3 SKIP. Three suite files that need PUC's internal test library T do not run. The ASan/UBSan run is 619 PASS / 0 FAIL / 4 XFAIL. Fuzzing is not a 1.0.0 gate and continues afterwards.
Differences: docs/DIFFERENCES.md lists them, each with its reason. They include a private bytecode dump format, one incremental collector ("generational" is accepted, but there is no separate generational collector), different stack and table size limits, and the LuaJIT 3.0 -> and continue syntax. The Lua 5.1 leftovers (unpack, module and so on) are off by default and can be enabled with a compile flag. A program written for LuaJIT 2.1 gets Lua 5.4 rules for numbers and for loops.
Performance: On the classic benchmarks it is within 10% of stock LuaJIT on both architectures. The exceptions are two workloads of about 10 ms or less, where a repeat measurement did not confirm the gap. It is faster than PUC 5.4.9 on every classic workload except scimark on x86_64, where PUC is 2.6% faster. These are medians of 3 on one host per architecture, so treat small differences as noise.
How it was built: LLM coding agents (Claude, DeepSeek and Qwen models) did the implementation under human direction. A second model reviewed each batch of changes before it was pushed. The differential tests are the evidence, not the process.
If you find a program that behaves differently from PUC 5.4.9 and the difference is not in DIFFERENCES.md, please open an issue. Repo and release notes: https://github.com/marfrit/JITLua-5.4 (tag v1.0.0)