[ANN] DCLua - Lua 5.3 VM and compiler for Go

224 views
Skip to first unread message

milo.chr...@gmail.com

unread,
Oct 25, 2016, 12:58:12 PM10/25/16
to golang-nuts


DCLua is a lightweight Lua 5.3 VM and compiler for embedding in Go programs. Most of the Lua standard library is implemented, the exceptions are due to implementation details, security, and just plain laziness... 


AFAIK there are two other pure-Go Lua VMs available, one is for 5.1, and the other for 5.2. This VM is slightly slower than both the alternatives (I haven't optimized it at all), but the one has next to no documentation and the other is extremely buggy. My VM is stable, documented, and easy to use.

Have fun!

chri...@uber.com

unread,
Oct 25, 2016, 1:37:09 PM10/25/16
to golang-nuts, milo.chr...@gmail.com
Thanks! I will try to use it in my project, which is a map reduce system in pure Go. But the computation is in Lua. Currently it support calling Luajit via an external OS process.


Maybe you can also post some perf numbers?

Chris

milo.chr...@gmail.com

unread,
Oct 25, 2016, 1:42:59 PM10/25/16
to golang-nuts, milo.chr...@gmail.com
I don't have any number currently, and I no longer have the other VMs I tested installed any more. There is a disabled "benchmark" included in the package that will run a chunk of code in both my VM and the fastest of the ones I tested. If I remember correctly it was measurably slower, but well within an order of magnitude. Sometime I need to sit down and do some optimizing...
Reply all
Reply to author
Forward
0 new messages