Skip to content
aicoolies logo
napi-rs logo

napi-rs

Build native Node.js addons in Rust via Node-API

napi-rs is a framework for building compiled Node.js native addons in Rust through the Node-API interface, eliminating node-gyp and C++ toolchains. It provides async/await with Promise integration, extensive type mappings between Rust and JavaScript, and cross-compilation to Windows, macOS, Linux, FreeBSD, and Android across x64, ARM, and RISC-V. Used by major JS tooling projects, napi-rs enables Rust-speed performance in Node.js apps.

About napi-rs

napi-rs is a Rust framework that enables developers to build high-performance native Node.js addons using the stable Node-API interface. By bypassing the traditional node-gyp and C++ compilation pipeline, it dramatically simplifies the process of creating native modules while providing full access to Rust's safety guarantees, zero-cost abstractions, and ecosystem of libraries. The framework handles all the boilerplate of Node-API bindings through procedural macros, letting developers write idiomatic Rust that automatically becomes callable from JavaScript.

The framework supports comprehensive type conversions between Rust and JavaScript including primitives, objects, typed arrays, buffers, BigInt, and complex nested structures. Async operations integrate naturally through Rust futures that map to JavaScript Promises, enabling non-blocking native code execution. Cross-compilation support covers Windows, macOS, Linux, FreeBSD, and Android across x64, ARM, PowerPC, RISC-V, and LoongArch architectures, making it possible to publish pre-built binaries for all major platforms from a single CI pipeline.

With over 7,700 GitHub stars and 550 releases, napi-rs has become the standard way to integrate Rust into the Node.js ecosystem. Major JavaScript tooling projects depend on it as their native binding layer, leveraging Rust performance for CPU-intensive tasks like parsing, compilation, and bundling. The MIT-licensed project maintains compatibility with Node.js 10 and above, ensuring broad adoption across both legacy and modern Node.js environments with minimal version constraints.

Pricing & Platform Specs

Pricing Summary

Free and open-source under the MIT license.

Supported Platforms

Node.js 10+, Rust 1.88+, all major OS

Explore categories, tags & use cases

Fast async link checker written in Rust

Lychee is a fast, asynchronous link checker written in Rust that finds broken URLs and email addresses in Markdown, HTML, reStructuredText, and websites. Available as a CLI tool, Rust library, and GitHub Action, it validates links with configurable concurrency, rate limiting, and retry logic. Supports GitHub token authentication for API rate limit avoidance and can check both internal file links and external HTTP endpoints across entire repositories or websites.

Open Source

Community experience

Sources & verification

Sources checked
Content verified

Verification dates are editorial checks. Routine CMS saves and automatic updatedAt timestamps do not advance them.

FAQ

What is napi-rs?

napi-rs is a framework for building compiled Node.js native addons in Rust through the Node-API interface, eliminating node-gyp and C++ toolchains. It provides async/await with Promise integration, extensive type mappings between Rust and JavaScript, and cross-compilation to Windows, macOS, Linux, FreeBSD, and Android across x64, ARM, and RISC-V. Used by major JS tooling projects, napi-rs enables Rust-speed performance in Node.js apps.

Is napi-rs free?

Yes — napi-rs is open source and free to use. Free and open-source under the MIT license.

Is napi-rs open source?

Yes — napi-rs is open source.

Is napi-rs still maintained?

Yes — napi-rs is active. Its listing was last verified on August 26, 2026.

What are the best napi-rs alternatives?

The first editor-selected napi-rs alternatives are Lychee.