node-rust-addon

Installation
SKILL.md

Node Rust Addons

Use this skill when a project needs a Node.js module backed by Rust code, or when comparing Node-API, FFI, and WASM approaches.

2026 Source Baseline

  • Node.js 26.3 docs: Node-API remains the recommended stable addon ABI; node:ffi exists in Node 26.1+ but is experimental, gated by --experimental-ffi, and unsafe.
  • Node-API docs: use Node-API for ABI-stable native addons; use simple async work or ThreadSafeFunction when native work must complete off the main JS thread.
  • napi-rs docs: current napi 3.x supports Rust Node-API modules, generated TypeScript, AsyncTask, ThreadsafeFunction, and a tokio_rt feature for returning JS Promises from Tokio futures.
  • Neon docs: current neon 1.1.x provides safe Rust bindings for Node addons, npm init neon, module exports, Channel, and optional futures/Tokio integration.
  • node-ffi-rs / ffi-rs: Rust + N-API implementation of runtime FFI for calling C/C++/Rust dynamic libraries from JS. It supports primitive types, arrays, structs, pointers, callbacks, platform prebuilds, and running FFI work in a new thread. Treat pointer and lifetime handling as unsafe boundary code.
  • node-addon-api: C++ wrapper over Node-API. Use it for C/C++ addons or when a library already has C++ binding expertise, not as the first choice for Rust.

Primary references:

Installs
22
Repository
avbel/ai-skills
GitHub Stars
2
First Seen
Jun 8, 2026