napi / Introduction

https://napi.rs

From the node docs: https://nodejs.org/api/n-api.html

Node-API (formerly N-API) is an API for building native Addons. It is independent from the underlying JavaScript runtime (for example, V8) and is maintained as part of Node.js itself. This API will be Application Binary Interface (ABI) stable across versions of Node.js. It is intended to insulate addons from changes in the underlying JavaScript engine and allow modules compiled for one major version to run on later major versions of Node.js without recompilation. The ABI Stability guide provides a more in-depth explanation.

Difference between napi and napi-rs

  • napi is the api exposed by node
  • napi-rs is the rust framework over it that lets you build pre-compiled NodeJS addons in Rust