Node.js插件(addons)html
Node.js 插件是用 C++ 编写的动态连接共享对象,可使用 require() 函数加载到 Node.js 中,且像普通的 Node.js 模块同样被使用。 它们主要用于为运行在 Node.js 中的 JavaScript 与 C/C++ 库之间提供接口。node
基础文档:http://nodejs.cn/api/addons.htmlgit
进阶文档:https://nodeaddons.com/github
node-gypapi
Node.js 插件构建工具。函数
文档地址:https://github.com/nodejs/node-gyp工具
node-gyp binding.gypui
binding.gyp配置文件的参数说明。spa
文档地址:https://gyp.gsrc.io/docs/UserDocumentation.md插件
node-gyp binding.gyp 例子
一些Node.js 插件的binding.gyp文件示例。
连接地址:https://github.com/nodejs/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild
node-pre-gyp
它只是一个工具,可让发布和安装Node.js C ++插件更容易。
文档地址:https://nodeaddons.com/cross-platform-addons-with-node-pre-gyp/