Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing C++ modules for node.js [closed]

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

like image 536
AndrewMcLagan Avatar asked Oct 09 '12 09:10

AndrewMcLagan


People also ask

Is NodeJS written in C?

Node. js is written in C++. C and C++ are different languages, with different strengths and weaknesses. C is strongest in getting the most direct access and closest control over hardware--the Linux Kernel, for example, is in C.

Why do we need C++ addons in node JS?

It gives the opportunity to make intensive, parallel, and high-accuracy calculations. It also gives the opportunity to use C++ libraries in NodeJS. We can integrate a third-party library written in C/C++ and use it directly in NodeJS.

Does the node wrap all the modules?

It implies the file name of the current module. It refers to the directory name of the current module. Note that every file in Node. js will wrap every file that it executes.


1 Answers

The repository at https://github.com/kkaefer/node-cpp-modules contains 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.

like image 58
kkaefer Avatar answered Oct 13 '22 22:10

kkaefer