4 ms·
MoonScript is designed to compile to Lua, and there are no good ways to run Lua in the browser right now. It's impossible to write a Lua -> JS transpiler while
by leafo 10y ago
MoonScript is designed to compile to Lua, and there are no good ways to run Lua in the browser right now. It's impossible to write a Lua -> JS transpiler while matching all the same functionality (coroutines), so the only option is to run the entire Lua vm in the browser (The MoonScript online version uses this approach with emscripten).
In the future I'd like to be able to run MoonScript in the browser, maybe web assembly is the answer.
Another option would be to have a JS target for the MoonScript compiler, but there are some issues with different language features that would make code sharing difficult (1 indexed arrays, metatables, etc.)
I have no plans to give up moonscript. I haven't been actively developing it recently though, which I feel guilty about.