awesome-repositories.com
المدونة
awesome-repositories.com

اكتشف أفضل مستودعات المصادر المفتوحة باستخدام بحث مدعوم بالذكاء الاصطناعي.

استكشفعمليات بحث منسقةبدائل مفتوحة المصدربرمجيات ذاتية الاستضافةالمدونةخريطة الموقع
المشروعحولكيفية ترتيب النتائجالصحافةخادم MCP
قانونيالخصوصيةالشروط
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
nodejs avatar

nodejs/nan

0
View on GitHub↗
3,351 نجوم·527 تفرعات·C++·mit·4 مشاهدات

Nan

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 management.

It covers a broad range of native development capabilities, including the wrapping of C++ classes as JavaScript objects, the execution of native tasks on background threads via asynchronous worker patterns, and the management of memory through handle scopes and garbage collection hooks. It also provides utilities for data type conversion, string encoding, and the execution of JavaScript scripts from native code.

This is a header-only library.

Features

  • Engine API Abstractions - Hides V8 API differences across Node versions behind a consistent set of C++ macros and inline functions.
  • Node.js Native Addons - Provides a consistent C++ API for building native Node.js addons that work across multiple V8 and Node.js versions.
  • Native Object Accessors - Binds native C++ class instances to JavaScript objects for use within the script environment.
  • Async Callback Persistence - Protects function handles from garbage collection to ensure they remain valid across asynchronous execution cycles.
  • Execution Scopes - Manages the lifecycle of local V8 handles using escapable scopes to prevent memory leaks.
  • Binary Buffer Management - Implements a version-agnostic interface for allocating and manipulating binary data and typed arrays.
  • Async Worker Patterns - Implements an asynchronous worker pattern to run native C++ tasks on background threads with callbacks to JavaScript.
  • Binary Buffer Managers - Allocates and copies memory buffers through a version-compatible API for native addon development.
  • Callback Lifecycle Management - Prevents function handles from being garbage collected to ensure safe execution during asynchronous native tasks.
  • Node.js Buffer Encodings - Provides version-compatible APIs for allocating and converting Node.js Buffer objects and string encodings.
  • Native Memory Lifecycle Management - Manages the memory lifecycle of C++ classes wrapped as JavaScript objects across V8 handle scopes.
  • Native Method Registration - Binds native C++ functions and data structures to JavaScript objects using version-compatible templates.
  • Native Object Wrapping - Exposes C++ classes as JavaScript objects using base wrapper templates for constructors and method dispatch.
  • Buffer Abstraction Layers - Ships an abstraction API for allocating, copying, and freeing Node.js Buffers across different versions.
  • Buffer Abstractions - Provides a version-compatible Buffer abstraction API for consistent memory management across Node.js versions.
  • Native Addon Abstraction Frameworks - Provides a consistent C++ API abstraction for building native Node.js addons across multiple V8 versions.
  • Native Async Worker Patterns - Implements asynchronous worker patterns to execute heavy native tasks on background threads.
  • V8 Object Wrapping - Exposes C++ classes as JavaScript objects with consistent lifecycle management across engine versions.
  • Native-Backed JavaScript Functions - Exposes C++ functions as native-backed JavaScript functions within objects.
  • Asynchronous Background Processors - Offloads time-consuming native tasks to background threads to maintain responsiveness on the main JavaScript thread.
  • Cross-Version Compatibility Gating - Hides V8 API differences behind macros and inline functions to ensure cross-version compatibility.
  • V8 API Abstraction Layers - Acts as a compatibility layer allowing C++ code to compile against multiple versions of the V8 engine.
  • Runtime API Wrappers - Hides V8 API version differences behind a single set of macros and inline functions for cross-version compatibility.
  • Garbage Collection Prevention - Wraps function handles to ensure they are not garbage collected while background work is still in progress.
  • Persistent Handle Management - Holds V8 object references that outlive handle scope disposal until they are explicitly freed.
  • Native Type Converters - Translates V8 engine value types into native C++ types with success/failure signaling.
  • Native Module Definitions - Defines the initialization function and exports the methods accessible to the JavaScript environment.
  • Typed Arrays - Provides helper classes to access the raw binary contents of JavaScript typed arrays from native code.
  • Native Property Accessors - Defines object properties with custom getters and setters to link native C++ data to JavaScript accessors.
  • Persistent Object References - Provides a persistent reference manager to ensure V8 objects survive handle scope disposal until explicitly freed.
  • String Encoding Converters - Converts between JavaScript string and byte encodings consistently across different V8 versions.
  • Value Construction Helpers - Constructs JavaScript primitives and objects using a unified helper to maintain cross-version compatibility.
  • Native-to-Script Function Invocations - Calls JavaScript functions from native code with support for context awareness and custom argument handling.
  • Object Lifetime Management - Controls the lifetime of JavaScript objects by binding them to references to prevent premature garbage collection.
  • Temporary Scope Management - Creates and disposes V8 handle scopes to safely manage object references across multiple Node versions.
  • Runtime Exception Handling - Creates and throws typed JavaScript exceptions using helpers that abstract engine version differences.
  • Cross-Environment Value Generators - Produces common JavaScript types like objects and booleans using a version-agnostic interface.
  • Monadic Handle Wrappers - Implements monadic wrappers for V8 handles to safely propagate emptiness without explicit null checks.
  • V8 Engine Memory Management - Allows native addons to adjust external memory tracking and register callbacks for V8 garbage collection events.
  • Asynchronous Task Managers - Coordinates concurrent background operations and signals progress from native threads back to the main event loop.
  • Native-to-JS Thread Dispatching - Provides a helper to run C++ work on background threads and invoke JavaScript callbacks upon completion.
  • Value Type Conversions - Translates V8 engine value types into native C++ types with return signals for success tracking.
  • Monadic Error Handling - Wraps engine handles in monadic Maybe types to ensure safe accessor methods and propagate emptiness.
  • Monadic Containers - Encapsulates potentially empty V8 handles using monadic containers to avoid explicit null checks.
  • Throw-Based Error Handlers - Processes typed errors by abstracting the creation and throwing mechanisms of the underlying JavaScript engine.
  • Reference Lifecycle Management - Manages the lifecycle of persistent V8 object references that must survive handle scope disposal.
  • V8 Handle Persistence - Provides a persistent reference manager for V8 objects that must survive handle scope disposal.
  • Asynchronous Task Executors - Manages the scheduling and execution of asynchronous native tasks using thread pools and lifecycle helpers.
  • Typed Error Objects - Generates typed JavaScript exceptions using helpers that abstract engine-specific error constructors.

سجل النجوم

مخطط تاريخ النجوم لـ nodejs/nanمخطط تاريخ النجوم لـ nodejs/nan

بحث بالذكاء الاصطناعي

استكشف المزيد من المستودعات الرائعة

صف ما تحتاجه بلغة بسيطة — وسيقوم الذكاء الاصطناعي بترتيب آلاف المشاريع مفتوحة المصدر المنسقة حسب الصلة.

Start searching with AI

بدائل مفتوحة المصدر لـ Nan

مشاريع مفتوحة المصدر مشابهة، مرتبة حسب عدد الميزات المشتركة مع Nan.
  • nodejs/node-addon-apiالصورة الرمزية لـ nodejs

    nodejs/node-addon-api

    2,400عرض على GitHub↗

    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 bet

    C++nodenodejs
    عرض على GitHub↗2,400
  • nativescript/nativescriptالصورة الرمزية لـ NativeScript

    NativeScript/NativeScript

    25,446عرض على GitHub↗

    NativeScript is a cross-platform mobile development framework that enables the creation of native iOS and Android applications using JavaScript or TypeScript. It provides a direct bridge to native platform APIs, allowing developers to invoke native classes, methods, and properties directly from script code while maintaining full access to underlying mobile operating system features. The framework distinguishes itself through its direct native UI rendering, which maps declarative markup components to actual platform-native widgets rather than web-based views. This architecture is supported by

    TypeScriptandroidangularcapacitor
    عرض على GitHub↗25,446
  • mozilla/rhinoالصورة الرمزية لـ mozilla

    mozilla/rhino

    4,594عرض على GitHub↗

    Rhino is a Java-based JavaScript engine that implements an ECMAScript compatibility layer for execution inside a Java virtual machine. It serves as an embedded scripting engine and a scripting bridge, allowing JavaScript code to be integrated and executed within Java applications. The project facilitates direct inter-language communication by mapping Java classes and objects into a JavaScript environment. This integration enables scripts to interact with internal system services and native host objects through a dedicated mapping mechanism. The engine optimizes performance by compiling JavaS

    JavaScript
    عرض على GitHub↗4,594
  • chyingp/nodejs-learning-guideالصورة الرمزية لـ chyingp

    chyingp/nodejs-learning-guide

    6,874عرض على GitHub↗

    This project is a learning guide and collection of study notes designed to teach Node.js backend development. It provides a comprehensive core API reference and practical demonstrations for implementing server-side logic, network programming, and system APIs. The guide specifically covers advanced technical domains including process management for scaling applications via clusters and child processes, as well as network programming for building TCP, UDP, and HTTP services. It also includes detailed instructional material on security implementation, focusing on cryptographic hashing and encryp

    Rubycryptoexpressnodejs
    عرض على GitHub↗6,874
عرض جميع البدائل الـ 30 لـ Nan→

الأسئلة الشائعة

ما هي وظيفة nodejs/nan؟

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.

ما هي الميزات الرئيسية لـ nodejs/nan؟

الميزات الرئيسية لـ nodejs/nan هي: Engine API Abstractions, Node.js Native Addons, Native Object Accessors, Async Callback Persistence, Execution Scopes, Binary Buffer Management, Async Worker Patterns, Binary Buffer Managers.

ما هي البدائل مفتوحة المصدر لـ nodejs/nan؟

تشمل البدائل مفتوحة المصدر لـ nodejs/nan: nodejs/node-addon-api — This project provides a header-only C++ wrapper for the Node-API, serving as a framework for building high-performance… nativescript/nativescript — NativeScript is a cross-platform mobile development framework that enables the creation of native iOS and Android… mozilla/rhino — Rhino is a Java-based JavaScript engine that implements an ECMAScript compatibility layer for execution inside a Java… chyingp/nodejs-learning-guide — This project is a learning guide and collection of study notes designed to teach Node.js backend development. It… java-native-access/jna — JNA is a foreign function interface and native memory mapper that allows Java applications to call functions in shared… orangeduck/cello — Cello is a programming language extension for C that provides a higher-level implementation of the language. It…