The embedding API avoids the Lua C API’s stack-based interface in favor of typed Go values and callback frames. Libraries and script-file access are opt-in, so the host explicitly controls what Lua code can access.
On my current benchmarks and use-cases, Lunar is often ~1.5x to 2x faster than GopherLua and Shopify’s go-lua. Its largest improvement however is memory use: loading a 9 MB CBOR-derived object graph (hundreds of thousands of tables) allocates about 107 MB versus 785 MB with GopherLua, with roughly 72 MiB versus 542 MiB retained after GC.
The public API is still stabilizing, and I’d especially appreciate feedback on the embedding design and Go interface.
(Note that this project started in another repo when I still had hopes of porting some of my changes back upstream to another existing library.)
granganath•53m ago