A Lua 5.4 superset in safe Rust for running untrusted scripts: exact fuel, memory and depth limits, an incremental collector, an optional typed dialect and a capability-based host API.
-- Closures made in a loop, capturing loop locals, called once or kept briefly.
locals=0localkeep={}fori=1,300000dolocala,b=i,i*2localf=function(x)returna+b+xendlocalg=function()a=a+1returnaends=s+f(1)+g()keep[i%64+1]=fendreturns