本文共 821 字,大约阅读时间需要 2 分钟。
Node.js可以通过以下方法扩展功能
1.编写内核模块,需要重新编译nodejs,个人不推荐。
2.编写c++扩展模块
2.1 使用V8/libuv/node API开发c++ Addons
https://github.com/nodejs/node-addon-examples
http://blog.csdn.net/chenhaifeng2016/article/details/74939493
2.2 使用Native Abstractions for Node.js (nan) 开发c++ Addons
https://github.com/nodejs/nan
2.3 使用N-API开发c++ Addons
https://nodejs.org/dist/latest-v8.x/docs/api/n-api.html
electron如何使用扩展模块?
https://electron.atom.io/docs/tutorial/using-native-node-modules/
https://github.com/electron/electron/blob/master/docs-translations/zh-CN/tutorial/using-native-node-modules.md
electron使用Node.js扩展模块
http://blog.csdn.net/chenhaifeng2016/article/details/74962611
electron通过ffi使用DLL
http://blog.csdn.net/chenhaifeng2016/article/details/75007006
electron通过Node.js扩展模块来使用DLL
http://blog.csdn.net/chenhaifeng2016/article/details/74989966