Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

nitro

> 前端框架
Open source

Insanely fast native C++, Swift or Kotlin modules with a statically compiled binding layer to JSI

1.9K stars0 likes2 views
WebsiteGitHub

About

Insanely fast native C++, Swift or Kotlin modules with a statically compiled binding layer to JSI


Nitro Modules are fast, type-safe native modules for React Native with statically compiled bindings to JSI. They consist of two parts:

  • react-native-nitro-modules: The core C++ library powering all nitro modules
  • nitrogen: An optional code-generator for nitro module library authors

Example

Declaration (TypeScript):

typescript
export interface Math extends HybridObject<{ ios: 'c++' }> {
  add(a: number, b: number): number
}

Implementation (C++, Swift or Kotlin):

cpp
class HybridMath: public HybridMathSpec {
public:
  HybridMath(): HybridObject(TAG) {}
  double add(double a, double b) override {
    return a + b;
  }
}

Usage (TypeScript):

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:

bash
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.ts example playground

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

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++cppfasthybridhybrid-object

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架