margelo/nitro
margelo/nitro has 1,971 GitHub stars and 128 forks. GitHot measured +2 stars in 24 hours. Last checked 2026-11-07 00:48 UTC. Last push 2026-11-02.
🔥 Insanely fast native C++, Swift or Kotlin modules with a statically compiled binding layer to JSI
Measured star growth
- in 24h
- +2
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original
Nitro Modules are fast, type-safe native modules for React Native with statically compiled bindings to JSI. This repository contains:
- nitro-core: Shared native runtime for C++, Swift and Kotlin, the JavaScript API, and TypeScript definitions
- nitrogen: Code generator for C++, Swift, and Kotlin bindings
- react-native-nitro-modules: React Native installation, views, worklets, and native build integration
Example
Declaration (TypeScript):
export interface Math extends HybridObject<{ ios: 'c++' }> {
add(a: number, b: number): number
}
Implementation (C++, Swift or Kotlin):
class HybridMath: public HybridMathSpec {
public:
HybridMath(): HybridObject(TAG) {}
double add(double a, double b) override {
return a + b;
}
}
Usage (TypeScript):
import { NitroModules } from 'react-native-nitro-modules'
const math = NitroModules.createHybridObject<Math>('Math')
const result = math.add(5, 3)
Installation
Install react-native-nitro-modules from npm:
npm i react-native-nitro-modules
cd ios && pod install
Documentation
- Nitro docs 📚
- Community Discord 💬
- Nitro Module Builder AI GPT 🤖
- How to build a Nitro Module YouTube Tutorial ▶️
- nitrogen/README.md
- react-native-nitro-modules/README.md
- react-native-nitro-test example module
TestObject.nitro.tsHybridObject test specs
Supported Platforms
Cross-platform
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
iOS native modules and view components can be written either in pure C++, or pure Swift. Thanks to Swift 5.9, Swift Nitro Modules bridge directly to C++ instead of going through Objective-C message sends. Woohoo, no more Objective-C, and zero overhead C++ -> Swift calls! 🥳
Android
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! 🔥
Margelo
Nitro is built with ❤️ by Margelo. We build fast and beautiful apps. Contact us at margelo.com for consultancy services.
Contributing
Read CONTRIBUTING.md for the contribution flow (PR expectations, the required test-per-fix rule, and the nitrogen workflow). For environment setup and reproduction walkthroughs, see the contributing guide on the docs site.
License
MIT
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,714 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,251 starsreact/react
The library for web and native user interfaces.
252,360 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,631 stars