Local mission work · not upstream Lua

Zig-backed Lua 5.5 runtime foundation

A Cloudflare Pages-ready static summary of the local Zig-backed runtime, AOT, allocator, and cross-target validation work built around the Lua 5.5 development baseline.

Repository positioning

This site documents local Zig-backed mission work in a Lua development checkout. It does not change upstream Lua guidance, contribution flow, or positioning; official Lua information remains at Lua.org.

Runtime foundation

Project highlights

Lua 5.5 baseline

Compatibility is anchored to this repository's Lua 5.5 development line, its current source behavior, and the local validation corpus.

Zig VM/runtime

The VM/runtime track establishes Zig-side value, object, table, function, allocator, execution, and fallback contracts.

AOT track

Lua-to-Zig AOT work targets statically eligible chunks while routing dynamic semantics back through the shared runtime fallback path.

Allocator model

Runtime allocation is modeled around Zig allocators, bounded and failing modes, and a Lua lua_Alloc compatibility bridge.

Target matrix

Native, WASM, and SBF profiles

The foundation keeps platform capabilities explicit: native builds prioritize full compatibility, WASM constrains host capabilities and memory, and SBF remains an experimental spike with deterministic, bounded execution goals.

Native full x86_64/aarch64 compatibility-first runtime validation.
WASM constrained Capability-gated standard library and bounded memory checks.
SBF experimental Toolchain and feasibility spike, not a full compatibility promise.

Validation report summary

93/93 assertions passed

Final synthesis reported status: pass with 93 passed, 0 failed, and 0 blocked. Coverage included baseline, build/profile matrix, runtime, execution, advanced semantics, and cross-target areas.

Baseline

Stock C Lua build, Lua 5.5.1 version check, selected PUC tests, corpus listing, and classification passed.

Build profiles

Zig profile and feature-flag matrix accepted valid values and rejected invalid or disallowed combinations.

Runtime

Value, object, string, table, function, allocator, and lua_Alloc bridge tests passed.

Execution

VM Level 0/1, dynamic fallback, selected PUC, AOT eligibility, artifacts, fallback, and parity checks passed.

Advanced semantics

Advanced fallback plus debug and C API gates passed with unsupported and capability-denied paths accounted for.

Cross-target

Packaging, profile matrix, SBF spike report, integration validation, and validator discovery passed.

Reproducibility

Key local commands

python3 -m unittest discover -s tools/validation -p 'test_*.py'
zig build test --summary all
python3 tools/validation/baseline_oracle.py --repo /Users/davirian/dev/active/lua cross-area-integration-validation
make -s -j12 MYCFLAGS='-std=c99 -DLUA_USE_MACOSX' MYLDFLAGS= MYLIBS=
python3 -m http.server 8787 --directory site