| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Write once, run anywhere:
Build native modules for React Native with Node-API.
Warning
This library is still under active development. Feel free to hack around, but use at your own risk.
Important
This library builds Hermes from a pinned commit on its static_h branch, which carries Hermes' first-party Node-API implementation. React Native has not shipped that Hermes yet, so the range of supported React Native versions is very limited — see the react-native peer dependency of the host package for the version we currently build against. We expect this restriction to be lifted once React Native ships a Hermes with Node-API included.
Note
This library only works for iOS and Android and we want to eventually support React Native for Windows, macOS, visionOS and other out-of-tree platforms too.
See the document on "how it works" for a detailed description of what it's like to write native modules using this package.
This mono-repository hosts the development of a few packages:
Responsible for adding Node-API support to your React Native application:
Note: We'll sometimes refer to this as the "host package", as it can be seen as a host of Node-API modules in React Native apps.
A wrapper around CMake making it easier to produce prebuilt binaries targeting iOS and Android matching the the prebuilt binary specification.
Serves the same purpose as cmake-js does for the Node.js community and could potentially be upstreamed into cmake-js eventually.
A wrapper around Cargo making it easier to produce prebuilt binaries targeting iOS and Android matching the the prebuilt binary specification as well as napi.rs to generate Node-API bindings from annotated Rust code.
A tool to transform binding.gyp files into CMakeLists.txt files, intended for cmake-js or cmake-rn to build from.
A wrapper around the examples in the nodejs/node-addon-examples repo, using gyp-to-cmake and cmake-rn to prepare prebuilds and scaffolding for loading the addons.
The main purpose is to use these as tests to verify the implementation. We choose to use this as our first signal for compliance, over the js-native-api tests in the Node.js project, because the examples depends much less on Node.js built-in runtime APIs.
A test app using react-native-test-app to exercise the implementation of it all.
A simple example of using the ferric CLI to build a Node-API module for React Native in Rust.
| Back | FazBrowse Home | New Git URL |