Framework

React Native

New Architecture only. generate react-native writes a self-contained library into your app: TypeScript classes, member tables, the runtime, a Codegen spec, and build integration for Android (CMake) and iOS (CocoaPods).

How a call works

Intent.parseUri(...) / UIView.alloc().initWithFrame(...)
  → generated TypeScript → global.__nab (installed by one C++ Turbo Module)
  → Android: C++ runtime → JNI            iOS: Objective-C++ runtime → NSInvocation

One-time app setup

The generated library embeds the runtime. To depend on it instead, install native-api-bindgen-runtime from npm (npm install native-api-bindgen-runtime@beta).

The repository's examples/react-native/slice app does all of this. Its Showcase tab does real tasks (device dashboard, text-to-speech, share sheet, clipboard, persistent note, haptics) and its self-test suite passes 20 tests on the Android emulator and 19 on the iOS simulator (see Examples).

Measured

Release builds: about 1.50 µs per JSI → JNI call (Android emulator) and 1.14 µs per JSI → Objective-C call on the JS thread (iOS simulator); UIKit calls that hop to the main thread take about 10.0 µs. Metro does not tree-shake: the example's release APK is 19,312,390 bytes with bindings for its slice and 57,776,278 bytes with the whole Android SDK generated (baseline 18,623,666 bytes) — generate only what you use.