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.
-- Deep recursion building and walking tables (a list of depth 150, many times).
localfunctionbuild(d)ifd==0thenreturnnilendreturn{v=d,next=build(d-1)}endlocalfunctionsum(l)ifnotlthenreturn0endreturnl.v+sum(l.next)endlocals=0forr=1,4000dos=s+sum(build(150))endreturns