nodejs

nodejs/node-addon-api

C++ MIT Dev Tools

Module for using Node-API from C++

2.4k stars
500 forks
recent
GitHub +1 / week

2.4k

Stars

500

Forks

14

Open issues

30

Contributors

v8.9.0 26 Jun 2026

AI Analysis

node-addon-api is a header-only C++ wrapper library that simplifies using Node-API (Node.js's C API) from C++, providing object models and exception handling with low overhead. It serves C++ developers building native Node.js extensions and addons, not general application developers or those using only JavaScript. This is a specialized tool for a narrow technical niche: native module authors who need stable ABI compatibility across Node.js versions.

Dev Tools Library Discovery value: 3/10
Documentation 8/10
Activity 9/10
Community 8/10
Code quality 7/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

node-api c++-bindings native-modules header-only abi-stable
Actively maintained Well documented MIT licensed Niche/specialized use case Production ready
Deep Analysis · Based on README and public signals
6d ago

Official Node-API C++ wrapper maintained by Node.js foundation; header-only, low-overhead bindings for native addon development

node-addon-api is an official Node.js project providing C++ wrapper classes around the C-based Node-API. It simplifies native addon development by offering object-oriented semantics and exception handling over raw C bindings. Used by developers building performance-critical Node.js addons that require native code. Adoption appears concentrated in the native addon ecosystem rather than mainstream JavaScript development; real-world adoption metrics are not publicly transparent.

Origin

Created February 2017 as a modern alternative to nan (native abstractions for Node.js), node-addon-api was built to wrap the then-new Node-API standard. It evolved as Node-API matured and became the recommended approach for addon development, with the project tracking active LTS Node.js versions.

Growth

Star growth is modest (3 stars in 7 days as of June 2026) and stable rather than accelerating. Project has maintained consistent maintenance cadence over 9 years with regular releases (current version 8.9.0). Growth appears driven by Node.js LTS adoption cycles and native addon ecosystem maturity rather than viral adoption. Relative stability of similar projects (nan at 3355 stars, node-addon-examples at 2589 stars) suggests this is a mature, settled category rather than emerging.

In production

Adoption not verified through public metrics in README or repository metadata. No download statistics, production user list, or case studies provided. The existence of 500 forks and stable maintenance suggests real usage, but concrete production adoption evidence is absent from available signals. npm download data would be necessary to establish real-world usage scale.

Code analysis
Architecture

Header-only C++ wrapper library based on README. Appears to provide object-oriented classes wrapping Node-API's C functions, likely reducing boilerplate and enabling exception handling semantics. No access to actual source code structure beyond what README states.

Tests

README mentions codecov badge but does not document coverage percentage or testing strategy. Coverage infrastructure exists but extent is not transparent from README alone.

Maintenance

Last push 2026-06-26 (9 days before analysis date), indicating active maintenance. Project lists 7 active maintainers with documented governance. Release cycle appears regular. No signals of abandonment; however, low weekly star gain (3 in 7 days) and modest fork count (500) relative to Node.js core projects suggest this is a stable, focused tool rather than a growth-phase project.

Honest verdict

ADOPT IF: you are building Node.js native addons in C++ and want modern, low-overhead bindings to Node-API with official backing and stable maintenance. AVOID IF: you lack deep C++ expertise or prefer not to manage native compilation; consider pure-JS alternatives or napi-rs (Rust) if safety is priority. MONITOR IF: you maintain legacy nan-based addons; migration to node-addon-api appears well-supported but remains optional.

Independent dimensions

Mainstream potential

3/10

Technical importance

7/10

Adoption evidence

3/10

Risks
  • Real-world adoption scale is not documented; may be smaller than star count suggests or concentrated in undisclosed enterprise usage.
  • Native addon development remains a niche skill; broader Node.js ecosystem may shift toward WebAssembly or other alternatives, reducing demand.
  • Tight coupling to Node.js LTS release schedule means major version bumps yearly; requires ongoing maintenance burden for addon authors.
  • Header-only C++ libraries can face compilation issues across diverse toolchains and platforms; not documented in README.
  • Limited cross-language appeal compared to alternatives; C++ remains barrier vs. pure-JS or Rust solutions.
Prediction

Project will continue stable, incremental maintenance aligned with Node.js LTS cycles. Unlikely to see explosive growth; instead, consolidation as the default C++ addon layer for Node.js. Potential decline if WebAssembly adoption accelerates and reduces native addon necessity.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

C++
72.1%
JavaScript
26.1%
Python
1.6%
C
0.2%

Information

Language
C++
License
MIT
Last updated
2w ago
Created
115mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

nodejs

nodejs/node-addon-examples

A curated collection of Node.js C++ addon examples demonstrating best practices...

2.6k C++ Dev Tools
nodejs

nodejs/nan

NAN (Native Abstractions for Node.js) is a header-only C++ library that...

3.4k C++ Dev Tools
napi-rs

napi-rs/napi-rs

napi-rs is a framework for building Node.js native add-ons in Rust using...

7.8k Rust Dev Tools
nodejs

nodejs/node-gyp

node-gyp is a cross-platform command-line build tool for compiling native C/C++...

10.7k Python Dev Tools
mapbox

mapbox/node-pre-gyp

node-pre-gyp is a Node.js tool that simplifies publishing and installing C++...

1.2k JavaScript Dev Tools
vs. alternatives
nan (node-addon-nan)

Predecessor technology for addon abstraction. node-addon-api is the newer, officially recommended path forward. nan is higher stars (3355) but represents older approach; both serve similar niche.

napi-rs (Rust bindings to Node-API)

Significantly higher stars (7815) and represents competing language ecosystem for native addons. Appeals to developers preferring Rust safety guarantees over C++; different language choice rather than feature competition.

node-gyp

Build system for native addons (10656 stars). Orthogonal rather than competitive — node-addon-api is often used *with* node-gyp for compilation and linking.

node-addon-examples

Example implementations and reference documentation (2589 stars). Complementary resource; used alongside node-addon-api, not instead of it.