remedy-lua 0.1.2

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.
Documentation
1
2
3
4
5
6
7
8
9
10
-- MINOR: errors raised by the runtime while a C function is the running frame get a
-- Lua position in RemedyLua. C Lua adds "chunk:line:" only when the erroring frame is a
-- Lua function (luaG_runerror checks isLua(ci)). Expected (C Lua):
--   false  "attempt to call a table value"     (pcall calling a table)
--   false  "invalid key to 'next'"
-- RemedyLua prefixes a "chunk:line:" of the nearest Lua frame. Cause: vm.rs builds
-- runtime-error messages from the nearest Lua frame instead of the current frame.
local a, b = pcall({})
local c, d = pcall(next, {x = 1}, "nokey")
return a, b, c, d