awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
nodejs avatar

nodejs/node-addon-api

0
View on GitHub↗
2,400 stars·499 forks·C++·MIT·21 views

Node Addon Api

This project provides a header-only C++ wrapper for the Node-API, serving as a framework for building high-performance native addons for Node.js. It acts as a bridge between C++ and JavaScript, offering an object-oriented interface that simplifies the creation of compiled extensions while managing the complexities of the language boundary.

The library distinguishes itself by providing type-safe abstractions for data marshalling and memory management, ensuring that native and script-side objects are tracked and reclaimed correctly. It includes mechanisms for coordinating asynchronous tasks between background threads and the main event loop, preventing data corruption while offloading intensive computations. Furthermore, it maps native exceptions to standard script error types, ensuring consistent diagnostic reporting and failure handling.

Beyond its core bridging capabilities, the project supports the full lifecycle of native development, including the exposure of C++ classes and methods to the JavaScript runtime. It provides tools for managing environment lifecycles, automating code migrations, and executing performance benchmarks to evaluate native component behavior.

Features

  • Native Addon Frameworks - Provides a framework for building high-performance native addons for Node.js by wrapping native interfaces into object-oriented structures.
  • Node.js Native Addons - Builds high-performance compiled extensions for Node.js using C++ to execute intensive logic.
  • Asynchronous Task Execution - Offloads computationally expensive operations to background threads and returns results to the main event loop.
  • C-API Wrappers - Provides a type-safe object-oriented interface that simplifies interaction with low-level native APIs.
  • Cross-Language Data Exchange - Facilitates seamless data exchange and translation between native C++ primitives and JavaScript objects.
  • Native C-JavaScript Bridges - Provides abstractions for managing memory, data conversion, and task execution across the C++ and JavaScript boundary.
  • Foreign Function Interfaces - Enables the execution of compiled native code within a managed runtime by mapping data types and function calls.
  • Node-API Bindings - Provides a header-only object-oriented interface for building native Node.js addons using the Node-API.
  • Native Memory Lifecycle Management - Tracks and manages the memory and lifecycle of native C++ objects and JavaScript references to prevent leaks.
  • Native Addon Abstraction Frameworks - Provides a toolkit for exposing high-performance C++ logic and data structures to the JavaScript runtime.
  • Native Data Marshallers - Translates between native primitives and script-based data structures to facilitate seamless and reliable information exchange.
  • Script-to-Native Type Mappings - Translates between native primitives and script-based objects to facilitate seamless data exchange across the language boundary.
  • Thread Pool Offloading - Offloads intensive computations to background threads and returns results to the main event loop using non-blocking worker patterns.
  • Reference Counting - Tracks the lifecycle of native and script-side objects to ensure resources are reclaimed automatically when they are no longer in use.
  • Native Logic Integrations - Exposes native code and data structures through a standard interface to allow high-performance execution of compiled logic.
  • Error-to-Exception Mappings - Maps internal C++ errors to standard JavaScript exceptions for robust failure management.
  • JavaScript Data Types and Structures - Provides a type-safe interface for manipulating JavaScript primitives, objects, and buffers within native C++ code.
  • JavaScript Exception Handling - Translates native exceptions into JavaScript errors and provides mechanisms to manage error states across the language boundary.
  • JavaScript Object References - Tracks and releases native references to JavaScript objects to ensure memory is reclaimed correctly.
  • Native Class Wrappers - Wraps native class methods into accessible objects so that developers can instantiate and manipulate complex logic directly from within the runtime.
  • Native Object Wrapping - Exposes native class instances to the runtime so that developers can create, modify, and pass complex data structures.
  • Native Object Finalizers - Hooks into the garbage collection process to trigger cleanup routines for native resources once their corresponding script-side objects are destroyed.
  • V8 Object Wrapping - Wraps native C++ classes as JavaScript objects with integrated lifecycle and memory management.
  • Object Lifetime Management - Manages the lifecycle of native objects and memory buffers to ensure they are garbage collected when no longer referenced.
  • Native-to-JS Thread Dispatching - Invokes JavaScript functions from background threads to ensure reliable data exchange between native execution environments and the main event loop.
  • Native Error Code Converters - Maps native exceptions and error states to standard JavaScript error types for consistent failure handling.
  • Module Lifecycle Management - Hooks into the module lifecycle to perform cleanup, track module data, and manage resources across multiple threads or execution contexts.
  • Thread and Process Synchronization - Coordinates communication between background native threads and the main execution thread to prevent data corruption.
  • Native Error Reporters - Maps native exceptions to standard script error types to ensure consistent diagnostic reporting and stack trace propagation.
  • Native Panic-to-Exception Bridges - Converts internal native errors into standard script exceptions to prevent runtime crashes and provide meaningful feedback.

Star history

Star history chart for nodejs/node-addon-apiStar history chart for nodejs/node-addon-api

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Node Addon Api

Similar open-source projects, ranked by how many features they share with Node Addon Api.
  • nodejs/nannodejs avatar

    nodejs/nan

    3,351View on GitHub↗

    This project is a compatibility layer and abstraction library for building native C++ addons for Node.js. It provides a consistent C++ API that allows a single codebase to compile against multiple versions of the V8 JavaScript engine by hiding version-specific differences behind macros and inline functions. The toolkit differentiates itself through specialized wrappers and managers, including a monadic wrapper for handles to avoid explicit null checks, a persistent reference manager for objects that must survive handle scope disposal, and a buffer abstraction API for version-compatible memory

    C++nodenodejs
    View on GitHub↗3,351
  • neon-bindings/neonneon-bindings avatar

    neon-bindings/neon

    8,410View on GitHub↗

    Neon is a framework for writing high-performance native Node.js modules using the Rust programming language. It serves as a foreign function interface bridge and a toolchain for bootstrapping, compiling, and managing Rust-based extensions. The project provides a cross-language memory manager that handles buffers and object borrowing to ensure safe memory access between Rust and JavaScript. It enables the mapping of data types and function calls across the language boundary, allowing Rust functions to be exported to the script environment and JavaScript functions to be called from Rust. The f

    Rust
    View on GitHub↗8,410
  • justadudewhohacks/opencv4nodejsjustadudewhohacks avatar

    justadudewhohacks/opencv4nodejs

    5,045View on GitHub↗

    opencv4nodejs is a set of JavaScript wrappers and a C++ native addon that provides Node.js bindings for the OpenCV library. It functions as a computer vision library and image processing framework, exposing high-performance C++ algorithms to a JavaScript environment. The project enables the execution of vision algorithms for detecting faces, tracking objects, and analyzing visual data using deep neural networks. It includes capabilities for data pattern classification, text pattern recognition, and the identification of facial landmarks and gestures. The framework covers a broad capability s

    C++asynccvface-detection
    View on GitHub↗5,045
  • nodegit/nodegitnodegit avatar

    nodegit/nodegit

    5,753View on GitHub↗

    NodeGit is a native Node.js binding library that wraps the libgit2 C API, providing direct Git repository operations from JavaScript without shelling out to the Git command-line interface. It exposes Git operations such as cloning remote repositories, opening local repositories, reading file contents from specific commits, and walking through commit history, all through a Promise-based asynchronous API that prevents event loop starvation by offloading blocking operations to a worker pool. The library distinguishes itself by bridging the C/JavaScript boundary through N-API, with reference-coun

    JavaScript
    View on GitHub↗5,753
See all 30 alternatives to Node Addon Api→

Curated searches featuring Node Addon Api

Hand-picked collections where Node Addon Api appears.
  • a tool for building native node modules

Frequently asked questions

What does nodejs/node-addon-api do?

This project provides a header-only C++ wrapper for the Node-API, serving as a framework for building high-performance native addons for Node.js. It acts as a bridge between C++ and JavaScript, offering an object-oriented interface that simplifies the creation of compiled extensions while managing the complexities of the language boundary.

What are the main features of nodejs/node-addon-api?

The main features of nodejs/node-addon-api are: Native Addon Frameworks, Node.js Native Addons, Asynchronous Task Execution, C-API Wrappers, Cross-Language Data Exchange, Native C-JavaScript Bridges, Foreign Function Interfaces, Node-API Bindings.

What are some open-source alternatives to nodejs/node-addon-api?

Open-source alternatives to nodejs/node-addon-api include: nodejs/nan — This project is a compatibility layer and abstraction library for building native C++ addons for Node.js. It provides… neon-bindings/neon — Neon is a framework for writing high-performance native Node.js modules using the Rust programming language. It serves… nodegit/nodegit — NodeGit is a native Node.js binding library that wraps the libgit2 C API, providing direct Git repository operations… justadudewhohacks/opencv4nodejs — opencv4nodejs is a set of JavaScript wrappers and a C++ native addon that provides Node.js bindings for the OpenCV… java-native-access/jna — JNA is a foreign function interface and native memory mapper that allows Java applications to call functions in shared… tjanczuk/edge — This project is a polyglot runtime bridge and interop framework designed to execute .NET and Node.js code within a…