Skip to content
napi-bindings

Search

Search pages, projects and the Node-API reference

Build tools

node-api-stub

Links Node-API addons on every platform without Node.js installed: vendored headers and a NodeApi::NodeApi CMake target.

4 stars4 forks9.0.0· Nov 14, 2026Apache-2.0

Unreleased Version 10.0.0

Notable changes

  • Updated to Node-API version 10. Headers and the .def files are vendored unmodified from node-api-headers 1.9.0 (155 symbols); 9 symbols were missing in 8.0.0.
  • New NodeApi::NodeApi CMake target that applies the right link mechanism for each platform: import library for NODE.EXE with a delay-load hook on Windows (MSVC and MinGW), -U for each Node-API symbol on macOS, nothing on ELF platforms.
  • The project can be consumed with FetchContent, add_subdirectory and find_package(NodeApi) (exported targets and package config files).
  • The stub source is generated from the .def file. Static and shared stub libraries are optional and abort with a message when called, instead of returning napi_ok with uninitialised results.
  • New tests that load the addons in Node.js, including the -Bsymbolic case.
  • New build matrix: Linux x64/arm64 (glibc and musl), macOS universal, Windows x64/x86/arm64 (MSVC) and x64 (MinGW).

Breaking changes

  • Headers moved from the repository root to include/; node_api.c removed.
  • The node_api target and libnode_api.a are replaced by NodeApi::NodeApi and, for the static stub, NodeApi::stub / libnode_api_stub.a (NodeApi::legacy is an alias of it).

2021-03-27 Version 8.0.0, @NickNaso

Notable changes

  • Updated to Node-API version 8.

Commits

  • [09510f9b81] - Update Node-API to version 8. (NickNaso)

2021-01-29 Version 7.0.0, @NickNaso

Notable changes

  • Updated to Node-API version 7.
  • Added github action to build the library stub.
  • Updated all documentation for the project.

Commits