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.10 CORPUS: __lt / __le metamethods.
local P = {}
P.__index = P
P.__lt = function(a, b) return a.v < b.v end
P.__le = function(a, b) return a.v <= b.v end
P.__eq = function(a, b) return a.v == b.v end
local function p(v) return setmetatable({v=v}, P) end
print(p(1) < p(2), p(2) < p(1))
print(p(3) <= p(3), p(3) <= p(2))
print(p(5) == p(5), p(5) == p(6))