编译node.js addon(NAPI) #3314
Winterreisender
started this conversation in
Ideas
Replies: 1 comment
-
swig目前支持一些,py 和 lua https://github.com/xmake-io/xmake/tree/master/tests/projects/swig |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
node.js在调用c++代码时需要c++代码经过修改(可通过swig自动完成),然后通过node-gyp或者cmake.js来编译成node.js可用的addon。
这一功能在Electron中用的很多。现在xmake的C++项目编译到nodejs插件的一种方案需要生成cmakelist,手动添加cmake.js的一些特殊规则,然后用cmake.js编译,比较机械和繁琐。
Beta Was this translation helpful? Give feedback.
All reactions