node.js - nodejs如何调用lua脚本?
大家讲道理
大家讲道理 2017-04-17 11:46:19
0
4
664

我想在nodejs中能够调用lua脚本来执行一段逻辑,主要是客户端和服务端有一段同步逻辑,需要逻辑执行相同,客户端这边是用lua写的逻辑,不能进行修改了,服务端这边如果用js重写一样的逻辑,维护两份逻辑是很累的,所以想请教一下如何在nodejs中调用lua执行,谢谢,如果有现成的不错的npm库当然是最好的了,如果没有想请教一下如何简单的执行lua。

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(4)
巴扎黑

Well, I implemented a simple synchronous lua binding for nodejs myself.

黄舟

If you can continue to maintain the logic of Lua, then Lua can directly serve as the backend, such as Luvit. . I haven't used it, so I don't know if it's good or bad. Of course, since lz is based on nodejs, most of the time it can’t be put down to support lua, which is a bit painful. I really don’t know if there is such thing as nodejs lua binding. Otherwise, it is not very troublesome to write one by yourself. Nodejs is extended and then called lua. It is not difficult to implement this layer of wrapper in native. It is just a workload and the efficiency should be better than js implementation. The lua interpreter is better.

Ty80

Make good use of search: https://www.google.com/?gws_rd=ssl#newwindow=1&safe=off&q=js+l...

大家讲道理

nodejs calls the command line and executes lua

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template