Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMake or gyp for node.js addon development

In most of tutorials, they use gyp as the building system for C++ node.js add-on development. However, compared to gyp, CMake has a long history and have much much more documentations.

Therefore, my question is that: which one is better for node.js C++ addon development?

Thank you.

like image 449
Lin Z Avatar asked Apr 29 '14 03:04

Lin Z


People also ask

Should I install node-gyp globally?

It is good to install the node-gyp globally because main purpose of the node-gyp is to build the node native modules. node-gyp also need some tool like visual studio (in case of building on Windows) and python which also installed globally.

Does node-gyp need Python?

node-gyp requires that you have installed a compatible version of Python, one of: v3. 7, v3. 8, v3. 9, or v3.


1 Answers

I've just made available my new module today: CMake.js to support CMake based Node.js and io.js native addon development. It works exactly like node-gyp, please take a look at the readme and to the tutorial, then decide what's better for you.

like image 108
unbornchikken Avatar answered Sep 17 '22 06:09

unbornchikken