{"repo":"nodejs/nan","free":true,"listed":false,"github":"https://github.com/nodejs/nan","clone":"git clone https://github.com/nodejs/nan.git","description":"Native Abstractions for Node.js","language":"C++","stars":3353,"topics":["nodejs","node"],"license":"MIT","category":"dev-tools","readme_excerpt":"Native Abstractions for Node.js =============================== A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 8, 10, 12, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 and 26. Current version: 2.28.0 (See CHANGELOG.md for complete ChangeLog) Thanks to the crazy changes in V8 (and some in Node core), keeping native addons compiling happily across versions, particularly 0.10 to 0.12 to 4.0, is a minor nightmare. The goal of this project is to store all logic necessary to develop native Node.js addons without having to inspect NODE MODULE VERSION and get yourself into a macro-tangle. This project also contains some helper utilities that make addon development a bit more pleasant. News & Updates Usage Example API Tests Known issues Governance & Contributing News & Updates Usage Simply add NAN as a dependency using a package manager like npm, yarn, or bun: Pull in the path to NAN in your binding.gyp so that you can use #include in your .cpp files: This works like a -I when compiling your addon. Example Just getting started with Nan? Take a look at the Node Add-on Examples . Refer to a quick-start Nan Boilerplate for a ready-to-go project that utilizes basic Nan functionality. For a simpler example, see the async pi estimation example in the examples directory for full code and an explanation of what this Monte Carlo Pi estimation example does. Below are just some parts of the full example that illustrate the use o","default_branch":null,"files":null,"tree":[],"storefront":"/r/nodejs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nodejs/nan/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}