# nodejs/nan

Native Abstractions for Node.js

Repository: https://github.com/nodejs/nan
Canonical: https://ross.abutalabs.com/products/nan
Language: C++
License: MIT
License Family: permissive
Topics: nodejs, node
Last push: 2026-06-25T13:13:09+00:00

## Health v2 (maintenance only)
Score: 72/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 89, release rhythm 35, longevity 100
- inputs: {"age_days": 4792, "days_push": 69, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3353, forks 529 (observed 2026-08-28T04:07:57.886831+00:00)

## What it is
NAN (Native Abstractions for Node.js) is a header-only C++ library of macros and utilities that simplifies writing native Node.js add-ons that compile across many Node.js and V8 versions. It abstracts away version-specific V8 and Node core API differences so addon authors avoid manual NODE_MODULE_VERSION handling.

## Use cases
- write native C++ addons for node.js
- compile a node addon across multiple node versions
- avoid v8 api breaking changes in native modules
- build a c++ extension for nodejs
- maintain legacy native node modules

## When to choose
- you need to support Node.js versions older than those covered by N-API/node-addon-api
- you are maintaining an existing addon already built on NAN
- you need fine-grained access to V8 APIs with version abstraction

## When to avoid
- you are starting a new addon - prefer N-API via node-addon-api for ABI stability
- you only need JavaScript-level functionality with no native code
- you want addons that compile once and run across Node versions without recompilation

## Facets
- artifact type: library
- maturity: maintenance
- function: sdk, developer-tools, plugin-system
- domain: developer-tools, programming-languages
- platform: cpp, cross-platform
- tags: native-addons, v8, c++-bindings, node-api, header-only, nodejs

## Member repositories
- nodejs/nan (main) score 72

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:57.886831+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:40:56.969805+00:00, confidence not recorded.
  - readme: https://github.com/nodejs/nan (fetched 2026-08-28T04:07:57.886831+00:00, sha 039aecd49963)
- Data as of 2026-08-30T08:39:29.467469+00:00.
