Are there any recent Lua to JavaScript converters or interpreters somewhere?

Kevlar picture Kevlar · Oct 6, 2008 · Viewed 22.6k times · Source

I need to find a good Lua to JavaScript converter; lua2js on luaforge.org is out of date (3 or so years old and looks like it doesn't work on Lua 5.1) and I haven't yet found anything on Google.

Does anyone have any experience with any other converters out there? It should work on Lua 5.1 and preferably be .NET based, but .NET is not a requirement. A javascript lua interpreter would work as well.

Answer

Breton picture Breton · Dec 29, 2011

A new challenger appears: Lua.js https://github.com/mherkender/lua.js

For some awesome demos proving its maturity, see https://github.com/ghoulsblade/love-webplayer

Lua.js works by converting Lua code directly to ECMAscript (including JavaScript, ActionScript), which gives it an important speed advantage over solutions which attempt to implement the Lua VM in JavaScript.