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.12 CORPUS-III: __tostring on tostring() and print.
local V = {}
V.__tostring = function(v) return "V<" .. v.id .. ">" end
local a = setmetatable({id=1}, V)
print(tostring(a))
print(a)      -- print calls tostring via __tostring
print(tostring(a) == "V<1>")

-- also fires for string.format %s
print(string.format("%s|", a))