Cache compiled Lua scripts in memory.

This commit is contained in:
2026-08-07 15:50:26 +02:00
parent 41d5f1c014
commit 87a161058f
3 changed files with 224 additions and 8 deletions

View File

@@ -89,6 +89,12 @@ surface ScriptRuntimeSurface {
-- unrestricted host capabilities are unavailable unless explicitly
-- re-exposed by the host application.
@guarantee CompiledChunkCache
-- Validation and execution share a bounded, process-local cache of Lua
-- bytecode keyed by exact source. Cache hits still execute in a fresh
-- sandbox with the current host capabilities, limits, hooks, and globals.
-- Failed compilation is not cached; bytecode is never persisted.
@guarantee ExplicitHostCapabilities
-- Host-provided functions are exposed only through an explicit bds.*
-- capability table, never through ambient global access.