Validate Lua runtime suitability for the Native AOT client UI
Validate a Lua runtime for the proposed single XML/Lua client presentation layer. Work in isolated worktree /home/mathias/Projects/worktrees/engines-client-lua-aot on chore/client-lua-aot-validation. Inspect production .NET 10 Native AOT constraints and runtime alternatives; publish and execute a standalone proof with trimming/AOT diagnostics enabled. Cover typed native/script calls, structured action data and XML UI interaction, Unicode, errors/tracebacks, subscription/callback cleanup, isolation and runaway-script limits, and resource/GC behavior. Record evidence and platform limitations; no client migration, runtime adoption or gameplay changes. Acceptance: reproducible experiment and clear recommendation separating measured results from untested release-platform requirements. Outcome: Lua/Native AOT feasibility established on Linux x64, not production runtime adoption. Standalone proof at PRK.Client/TestSupport/LuaAotProbe publishes with full trimming and compiler/linker/AOT warnings as errors, no suppressions. Real retained XML widgets/input are driven by Lua through source-generated bindings; dynamic code is disabled at execution. LuaCSharp 0.5.7 and native KeraLua 1.4.11 functional proofs pass, including Unicode, structured synthetic action data, callbacks, native validation, error/source diagnostics; managed proof also exercises awaited host calls and state isolation. Five-sample median per 100k widget updates: managed Lua 16.915ms, direct C# control 3.066ms, native binding 19.151ms. Managed update loop observes zero allocation growth; ordinary KeraLua string APIs allocate 10MB/100k, native allocations unmeasured. Graphics regression: 703 passed/1 skipped in correct client-test environment. Important negative results retained: LuaCSharp lifecycle leaves 1/30 disposed/detached states alive; static VM context pool is a source-backed hypothesis, not a patched causal proof. Coroutine infinite loop bypasses parent's count hook in pinned package and reaches 3s watchdog; parent-loop/pcall/tail-recursion count budgets work, and separate wall cancellation stops tested coroutine. Upstream #355 fixes hook inheritance but was not built here. No strict managed per-addon memory quota; Lua5.2/UTF16/double semantics differ from native Lua5.4. Native smoke passes with explicit UTF8, but callback/OOM longjmp containment, allocator quotas and native hard interruption are not certified. Validator intentionally exits1/all_required_checks_passed=false; negative controls fail/hang as expected. Windows x64, macOS arm64, full-client integration, adversarial sandbox audit and real-frame performance remain unverified. Reproducible Dockerfile, runner, source evidence and recommendation in probe README.md; logs and hashed summary in .dev-data/lua-aot/results. No commit, no Lua dependency added to production client. Only existing-source edit is probe friend-assembly access to real layout engine.
Checklist
3 of 3 complete- Publish and execute a reproducible AOT proof exercising Lua-driven XML widgets, native callbacks, errors, lifecycle and execution limits.
- Compare runtime candidates against production AOT/platform and sandbox requirements using upstream source and documentation.
- Record measurements, failure cases, recommendation and unverified platform/security limits without adopting a runtime in the client.
- Area
- Project Rubi-Ka
- Project
- engines
- Kind
- Research
- Task ID
tsk_xbcrq732mq- Updated