Gluau: Go Bindings for Luau

1 cheesycod 1 8/18/2025, 10:37:22 AM github.com ↗

Comments (1)

cheesycod · 4h ago
Not sure if this counts as a Show HN or not, but I've been working on Go bindings for the Luau programming language. Luau is a programming language made by Roblox and is useful for non-Roblox as well thanks to its heavy sandboxing/hardening and lack of dangerous features/primitives out of the box.

Prior attempts at providing Lua bindings for Go (like golua) have heavy restrictions (like non-working exception handling/pcall/xpcall due to incompatiblities in exception handling) or are pure go ports of Lua (which is great if you're OK with a port but no one has ported Luau to pure Go yet and many times, you want the real thing).

To get around issue 1, gluau makes use of a rust proxy based on the mluau (fork of mlua) crate with errors caught by rust and translated to Result types for Go to then translate to idiomatic Go types. To quote a reddit user, its a "programming language centipede" but it works well and has support for a large part of the Luau language (including interrupts, memory limits, thread resume/yield and userdata) without any big limitations besides potential bugs here/there.