- Notifications
You must be signed in to change notification settings - Fork29
🔥 Insanely fast native C++, Swift or Kotlin modules with a statically compiled binding layer to JSI
License
mrousavy/nitro
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation

Nitro Modules are highly efficient native modules with a statically compiled binding layer to JSI, and typesafe JS bindings.It consists of two parts:
- react-native-nitro-modules: The core C++ library powering all nitro modules
- nitrogen: A code-generator for nitro module library authors
Declaration (TypeScript):
exportinterfaceMathextendsHybridObject{add(a:number,b:number):number}
Implementation (C++, Swift or Kotlin):
classHybridMath:publicHybridMathSpec {public:doubleadd(double a,double b)override {return a + b; }}
Usage (TypeScript):
constmath=NitroModules.createHybridObject<Math>('Math')constresult=math.add(5,3)
Installreact-native-nitro-modules from npm:
npm i react-native-nitro-modulescd ios&& pod install
- Nitro docs 📚
- Community Discord 💬
- nitrogen/README.md
- react-native-nitro-modules/README.md
- react-native-nitro-image example module
TestObject.nitro.ts
example playground
Cross-platform native modules can be built with C++.Any custom C++ types can be used and bridged to JS with minimal overhead.
JS <-> C++ type converters are statically generated ahead of time - no more dynamic lookups or runtime parser errors! 🥳
iOS native modules and view components can be written either in pure C++, or pure Swift.Thanks to Swift 5.9, Swift Nitro Modulesbridge directly to C++ instead of going through Objective-C message sends. Woohoo, no more Objective-C, andzero overhead C++ -> Swift calls! 🥳
Android native modules and view components can be written either in pure C++, or pure Kotlin/Java.Thanks to fbjni, even complex types can be effortlessly bridged to Kotlin/Java with minimal overhead! 🔥
Nitro is built with ❤️ by Margelo.We build fast and beautiful apps. Contact us atmargelo.com for consultancy services.
See thecontributing guide to learn how to contribute to the repository and the development workflow.
MIT
About
🔥 Insanely fast native C++, Swift or Kotlin modules with a statically compiled binding layer to JSI