Skip to content
 
 

Latest commit

 

History

842 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[update-readmes] Mode: rewrite — migrating to template structure...

node-addon-api

Built with Ona

This project provides a C++ wrapper for Node-API, enabling developers to create native Node.js addons using C++ with simplified syntax and improved usability. It addresses the complexity of directly interacting with Node-API by offering abstractions that streamline development. It is used by developers building high-performance native modules for Node.js applications.

Architecture

The project provides a C++ wrapper for Node-API, enabling the development of Node.js native addons. It abstracts the Node-API C interface, simplifying addon creation while maintaining compatibility across Node.js versions.

Key components:

  • napi.h and napi-inl.h: Core headers defining the C++ API.
  • node_addon_api.gyp: Build configuration for addons using this module.
  • test/: Unit tests for validating functionality.
  • benchmark/: Performance benchmarks for the API.
  • .github/workflows/: CI workflows for testing, linting, and releasing.

Directory structure:

.
├── benchmark/            # Performance benchmarks
├── doc/                  # Documentation files
├── test/                 # Unit tests
├── tools/                # Utility scripts
├── .github/workflows/    # CI/CD workflows
├── napi.h                # Core C++ API header
├── napi-inl.h            # Inline implementations for the API
├── node_addon_api.gyp    # Build configuration for addons
├── package.json          # Project metadata
└── README.md             # Project overview

Install

git clone https://github.com/Interested-Deving-1896/node-addon-api.git
cd node-addon-api

Usage

Configuration

CI

The project uses GitHub Actions for continuous integration and other automated workflows. Below is a summary of the workflows:

  • ci.yml: Runs tests and builds on Linux and macOS for supported Node.js versions. No secrets required.
  • ci-win.yml: Runs tests and builds on Windows for supported Node.js versions. No secrets required.
  • codeql.yml: Performs static code analysis using CodeQL. No secrets required.
  • coverage-linux.yml: Generates code coverage reports on Linux. No secrets required.
  • dependency-review.yml: Checks for vulnerable dependencies in pull requests. No secrets required.
  • linter.yml: Runs linting checks using ESLint. No secrets required.
  • node-api-headers.yml: Downloads and caches Node-API headers for use in builds. No secrets required.
  • release-please.yml: Automates release creation and changelog updates. Requires GITHUB_TOKEN (provided by default).
  • scorecards.yml: Runs OpenSSF Scorecards to assess repository security. No secrets required.
  • stale.yml: Marks inactive issues and pull requests as stale. No secrets required.

Mirror chain

This repo is maintained in Interested-Deving-1896/node-addon-api and mirrored through:

Interested-Deving-1896/node-addon-api  ──►  OpenOS-Project-OSP/node-addon-api  ──►  OpenOS-Project-Ecosystem-OOC/node-addon-api

Changes flow downstream automatically via the hourly mirror chain in fork-sync-all. Direct commits to OSP or OOC are detected and opened as PRs back to Interested-Deving-1896.

Contributors

@dependabot[bot] (132 commits)
@KevinEady (85 commits)
@NickNaso (76 commits)
@legendecas (62 commits)
@mhdawson (55 commits)
@JckXia (44 commits)
@jasongin (40 commits)
@addaleax (23 commits)
@romandev (22 commits)
@tniessen (20 commits)
@gabrielschulhof (15 commits)
@RaisinTen (13 commits)
@jschlight (9 commits)
@github-actions[bot] (8 commits)
@rolftimmermans (8 commits)
@kfarnung (7 commits)
@digitalinfinity (6 commits)
@yjaeseok (5 commits)
@vmoroz (5 commits)
@lovell (5 commits)
@nadongguri (4 commits)
@DaAitch (4 commits)
@JoseExposito (3 commits)
@devsnek (3 commits)
@davedoesdev (3 commits)
@rivertam (3 commits)
@rubiagatra (2 commits)
@seishun (2 commits)
@mildsunrise (2 commits)
@strager (2 commits)

This repository may be a mirror. Please check the upstream source for additional contributions.

Origins

Original project — no upstream fork.

Resources

No additional resource files found.

License

MIT © 2026 Interested-Deving-1896

About

Module for using Node-API from C++

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages