luna-core 2.13.0

Pure-Rust Lua runtime (interpreter only, zero third-party dependencies). The JIT-equipped variant lives in the `luna-jit` crate.
Documentation
1
2
3
4
5
6
7
8
9
10
-- v2.11 CORPUS-II: __index function receives (t, k) args.
local mt = {__index = function(t, k)
  return "lazy_" .. k
end}
local o = setmetatable({}, mt)
print(o.x, o.foo, o.bar_baz)

-- __index function called only on missing
o.present = "explicit"
print(o.present)  -- "explicit" (not lazy)