Hansen uses “native modules” and “native add-ons” for native code callable from JavaScript. Node-API is a C header-based interface for accessing JavaScript from native code, with an engine-specific part and a runtime-specific part. Its stable API is intended to let add-ons work across future runtime versions.
Bringing Node-API to React Native
Speaker
Kræn Hansen of Callstack explains how Node-API can bring native add-ons and their tooling to React Native at React Universe Conf 2025.
Node-API support does not make every Node.js package usable in React Native. Packages need a React Native prebuild or source code that can be built there, and their JavaScript must not rely on Node.js runtime APIs unless that code is isolated for Node.js. Hansen demonstrates fixing a Rust add-on and rebuilding it for the simulator.
The project includes a React Native host package that loads add-ons, connects runtime-specific Node-API functions, and discovers compatible add-ons for linking. Build tools copy add-ons into app bundles and prepare platform-specific prebuilds, such as XCFrameworks for Apple platforms and architecture-specific libraries for Android. Hansen describes CMake RN, a JIP-to-CMake converter, and Feric for Rust.
Some runtime-specific Node-API functions are still missing, and Hermes support remains an open pull request. The current setup uses a Hermes fork, which slows initial app builds and imposes React Native version requirements. Future work includes completing support, adding platforms, improving build tooling, and exploring libraries such as Automerge.
Takeaways
- Node-API can help reuse native libraries across runtimes when they avoid runtime-specific dependencies.
- Check a package’s JavaScript dependencies as well as its native add-on before evaluating React Native compatibility.
- Shipping prebuilt add-ons can reduce app build work and give library authors more control over their build tools.
- React Native Node-API support currently depends on a patched Hermes build and has some missing runtime functions.
- The described tooling supports native add-on workflows in C, C++, and Rust.
Mentioned in this talk
Search inside this talk
What was claimed 10
- featureNode-API: API-stable interface for accessing JavaScript from native code
“It’s an API-stable API”
YouTube Unverified1 source· Talk
- built
Microsoft built Hermes Agent
Node-API support“Microsoft has contributed to Hermes.”
6:01inHermes RoadmapYouTube Verified3 sources· Talk
- featureNode-Addon-API: Header-only C++ wrapper around the Node-API C API
“It’s a header-only C++ wrapper around the C API.”
YouTube Unverified1 source· Talk
- featurenapi-rs: Generates Node-API bindings and TypeScript declarations from Rust source
“It’s a binding generator that also generates the TypeScript declarations”
YouTube Unverified1 source· Talk
- featureReact Native Node API: Hosts Node-API add-ons in React Native apps, loads them at runtime, and helps link them at build time
“a package for hosting Node-API add-ons in React Native, helping them link at build time and load at runtime”
YouTube Unverified1 source· Talk
- featureReact Native Node API: Currently downloads a special version of Hermes with Node-API support
“it downloads a special version of Hermes with Node-API support”
YouTube Unverified1 source· Talk
- featureReact Native Node API: Exports a Babel plugin that transforms require calls for Node.js files into requireNodeAddon calls
“transform require calls for these Node.js files into calls to the requireNodeAddon function”
YouTube Unverified1 source· Talk
- featureReact Native: React Native core dependencies can be shipped as iOS prebuilds as an opt-in feature in version 0.81
“in 0.81”
YouTube Unverified1 source· Talk
- uses
“It wraps the napi-rs project”
YouTube Unverified1 source· Talk
- feature
Hermes Agent: Node-API support was under active development in an open pull request
“Hermes support for Node-API is still an open PR”
YouTube Unverified1 source· Talk






