2 个仓库
Binary interface mappings specifically for the Node.js native addon API.
Distinct from C Function Bindings: Specializes C function bindings to the specific Node-API binary interface
Explore 2 awesome GitHub repositories matching programming languages & runtimes · Node-API Bindings. Refine with filters or upvote what's useful.
napi-rs is a framework and toolkit for building high-performance native extensions for Node.js using Rust. It functions as a bridge between Rust and JavaScript runtimes, enabling the conversion of data types and the execution of native functions within a JavaScript environment. The project provides a native binary compiler and a cross-platform module orchestrator to automate the compilation and publishing of packages across multiple operating systems and architectures. It generates corresponding JavaScript type definitions and platform-specific binaries to ensure consistent installation. The
Maps native Rust functions to the Node-API binary interface to ensure cross-runtime compatibility.
该项目为 Node-API 提供了一个仅包含头文件的 C++ 包装器,作为构建 Node.js 高性能原生插件的框架。它充当 C++ 与 JavaScript 之间的桥梁,提供了一个面向对象的接口,简化了编译扩展的创建,同时管理了语言边界的复杂性。 该库通过为数据编组和内存管理提供类型安全抽象而脱颖而出,确保原生和脚本端对象被正确追踪和回收。它包括用于协调后台线程与主事件循环之间异步任务的机制,在卸载密集型计算的同时防止数据损坏。此外,它将原生异常映射到标准脚本错误类型,确保一致的诊断报告和故障处理。 除了其核心桥接功能外,该项目还支持原生开发的整个生命周期,包括将 C++ 类和方法暴露给 JavaScript 运行时。它提供了用于管理环境生命周期、自动化代码迁移以及执行性能基准测试以评估原生组件行为的工具。
Provides a header-only object-oriented interface for building native Node.js addons using the Node-API.