Lunar, a "fast", memory-efficient Lua 5.1 VM written in Go
Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.
Want to reach these readers? Sponsor an issue.
I'm releasing Lunar, a new Lua 5.1 compiler and virtual machine written entirely in Go. It includes the standard libraries, coroutines as well as supporting Lua 5.2-style goto.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.)
HN · launched Aug 3, 2026 · 8 upvotes (top 53%) · 0 views
Niche: programming language compilers · 79 launches, 3 in the last 7 days · Explore this niche →
Category and tags
- Horizontal
- Dev tools
- Developer
- Not AI
- Hobby / open-source project
Visit website ↗ Source listing ↗
More like this: all 79 launches in programming language compilers →
Could you build this?
No Writing a full programming language compiler, bytecode interpreter, and memory-efficient virtual machine in Go requires deep, specialized compiler design expertise.
What it would actually take: The project requires building a complete lexical scanner, recursive-descent parser, AST-to-bytecode compiler, and a register- or stack-based virtual machine implementing the Lua 5.1 specification and 5.2 goto semantics. It involves handling Lua coroutines, custom garbage collection interaction with Go's GC, and crafting a zero-alloc value representation (tagged unions or NaN-boxing). This level of language VM engineering demands extensive computer science expertise in formal grammar, bytecode execution, and low-level memory layout.
Discussion
2 comments analyzed.
Competitors
Other products that read as similar to this one : 98 launches clear the similarity bar, closest 8 shown.
Attention rank: #55 of 99 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).
Launched 271 days after the earliest competitor.
- Lunar, a coding harness extensible with Lua · hn · 2026-08-21 · 5 upvotes · similarity 0.48
- Moongate · hn · 2026-03-06 · 287 upvotes · similarity 0.44
- Lude · github · 2026-09-27 · 9 upvotes · similarity 0.41
- I made a Clojure-like language in Go, boots in 7ms · hn · 2026-05-09 · 292 upvotes · similarity 0.41
- Llm.sql · hn · 2026-04-24 · 8 upvotes · similarity 0.40
- Clx · hn · 2026-07-11 · 143 upvotes · similarity 0.40
- Ito · hn · 2026-10-14 · 74 upvotes · similarity 0.39
- We built a <60ms, open-source alternative to E2B using RustVMM and KVM · hn · 2026-04-22 · 7 upvotes · similarity 0.38
The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.