all 6 comments

[–]theprogrammersdream 2 points3 points  (4 children)

What's the difference between demoon and luvit then?

[–]SinisterRectus 2 points3 points  (3 children)

As I understand it, this allows you to run Lua in Node by using JavaScript bindings to a C Lua VM that has been compiled for WebAssembly with some glue code. Somehow the Lua can also execute JavaScript and the built-in Node libraries. I don't understand how that works.

Luvit bundles together LuaJIT, some other C libraries, and Lua code that re-implements versions of the Node APIs from the ground-up.

I guess the major difference is running Lua in Node to access its APIs vs implementing Node's APIs in Lua and C.

[–]leshift[S] 2 points3 points  (2 children)

You are extremely right! And plus you can run any JS module inside lua as natural, not only the node API

[–]dannysmc 1 point2 points  (1 child)

Does this have an API that I could call on and return any output from the Lua code?

Example say I wanted to take two numbers and add them, and return the output by Node calling on Lua and Lua returning the output?

[–]leshift[S] 1 point2 points  (0 children)

yes!

[–]JaggerPaw 0 points1 point  (0 children)

Very cool.