Repository navigation
v3.2.0
No breaking change. Two renamed Vm methods keep their old names as
deprecated aliases; the public-API audit against 3.1.0 finds nothing
removed or changed.
PUC-format string.dump
string.dump now writes bytecode in the format of the running dialect
(5.1, 5.2, 5.3, 5.4 or 5.5), which that version's stock lua loads and
runs. Every one of the 807 differential fixtures, compiled by luna and
dumped, runs under stock PUC with output byte for byte equal to PUC running
the source, and loads back into luna with the same result.
string.dump(f, true) strips debug information as PUC does. The embedder
function luna_core::vm::dump::dump still writes luna's own format.
A chunk in the running dialect's own PUC format now loads by default (it is
what string.dump produces); chunks of other PUC versions still need
Vm::set_puc_bytecode_loading(true), and every chunk passes the verifier.
The luna CLI follows lua.c
LUA_INIT / LUA_INIT_5_x, -E and the REPL behave as each dialect's
lua.c: prompts on stdout, return <line> first from 5.3 on, results
through print, errors with a traceback.
Robustness
A script (including through the debug library) or a loaded binary chunk
can no longer panic the VM: corrupted loop and constructor state raise Lua
errors, and a review of every panic site reachable from Lua turned the
reachable ones into Lua errors. The JIT now checks table operands and
array bounds, keeps negated float comparisons correct for NaN, and leaves a
trace at an inlined call whose target changed.
One deliberate difference from PUC: debug.setupvalue no longer changes
the upvalues of C functions, where library functions keep state they rely on.
5.1 now shares a zero constant between 0 and -0 the way PUC 5.1's
constant table does, so both print alike within a function.
On Windows, the error text of an io failure luna detects itself is the C
runtime's, as PUC prints it (Invalid argument).
luna-jit-llvm was published without cargo's build verification: the
release machine has no system LLVM 18 for llvm-sys (as for earlier
releases). CI builds it with LLVM installed.
The full list is in CHANGELOG.md.