javascript 为 node.js 编写 C++ 模块

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12796640/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 17:08:43  来源:igfitidea点击:

Writing C++ modules for node.js

javascriptc++node.jssocket.io

提问by AndrewMcLagan

Can anyone can give me a very small framework example of how to impliment a c++ module in node.js?

谁能给我一个非常小的框架示例,说明如何在 node.js 中实现 c++ 模块?

回答by kkaefer

The repository at https://github.com/kkaefer/node-cpp-modulescontains many small examples with lots of comments that show you how to create a module. In addition, there's a presentation(use left/right arrow keys) that goes into detail about C++ modules.

https://github.com/kkaefer/node-cpp-modules 上的存储库包含许多带有大量注释的小示例,向您展示如何创建模块。此外,还有一个介绍(使用左/右箭头键)详细介绍 C++ 模块。