luna-core 2.12.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
11
12
-- v2.12 CORPUS-III: __index function priority.
-- Present key beats __index; missing key calls __index.
local m = setmetatable({a = "raw"}, {__index = function(t, k) return "meta:" .. k end})
print(m.a, m.b, m.c)     -- raw meta:b meta:c

-- rawget bypasses
print(rawget(m, "a"), rawget(m, "b"))

-- rawset bypasses too
local m2 = setmetatable({}, {__newindex = function() error("nope") end})
rawset(m2, "x", 42)
print(m2.x)