Node.js & Electron的扩展模块

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





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值