# React Native Nitro Modules vs. TurboModules: 2026 Architecture, Performance Benchmarks, and Swift-C++ Interop Guide
Summary: Comparing React Native Nitro Modules vs. TurboModules highlights key architectural trade-offs. Nitro Modules eliminate Objective-C++ bridging overhead via Nitrogen codegen and direct Swift 5.9+ C++ interop. In open-source benchmarks on physical iOS devices, Nitro achieves ~73ns synchronous dispatch—roughly 15x faster than Objective-C++ bridged TurboModules (~1,158ns). While TurboModules remain core standard, Nitro maximizes throughput for performance-critical pipelines.
---
1. Executive Summary: The Native Bridge Frontier in 2026
Mobile architecture for enterprise SaaS has entered a performance-critical era. The historical bottleneck of cross-platform development—asynchronous JSON serialization across an opaque C++ bridge—was retired with the widespread adoption of React Native's New Architecture (Fabric renderer and TurboModules). In 2026, the JavaScript Interface (JSI) provides direct host-object reference sharing between the Hermes runtime and native memory.
However, mobile engineering leadership faces a secondary friction point: language runtime impedance.
While Meta's TurboModules eliminate serialization overhead, they introduce developer friction on iOS. Meta's react-native-codegen produces abstract C++ interfaces that require either pure C++ implementations or an intermediary Objective-C++ (.mm) bridge to communicate with modern Swift. This approach forces engineering organizations to maintain dual-language native layers, introduces Automatic Reference Counting (ARC) bridging penalties via objc_msgSend, and inflates build times.
Nitro Modules, developed by Marc Rousavy and Margelo, addresses this impedance. Built around Nitrogen codegen and Apple’s bidirectional Swift 5.9+ C++ interoperability, Nitro Modules remove Objective-C++ entirely. They compile TypeScript specifications directly into lightweight C++ JSI bindings that interface directly with pure Swift classes called HybridObjects.
For Mobile Directors, VPs of Engineering, and Technical Founders, choosing between Nitro Modules and TurboModules dictates memory footprint, developer velocity across native and TypeScript teams, frame-rate consistency under heavy I/O, and long-term maintenance costs.
---
2. Architectural Comparison: JSI, TurboModules, and Nitro Modules
Understanding the operational differences between native module paradigms requires analyzing how each abstraction layer interacts with the Hermes VM, host memory, and platform runtimes.
Meta TurboModules: The JSI Standard and Objective-C++ Indirection
The standard New Architecture pattern relies on Meta’s react-native-codegen:
1. Spec Declaration: A TypeScript or Flow specification defines module signatures.
2. Build-Time Codegen: react-native-codegen generates abstract C++ classes (facebook::react::TurboModule).
3. Native Bridging Layer: Because Swift cannot synthesize C++ virtual tables without dedicated bridging, developers write an Objective-C++ (.mm) class.
4. Runtime Invocation: Hermes dispatches to the C++ host object. The wrapper converts JSI values into Foundation types (NSString, NSNumber, NSDictionary), executes objc_msgSend to trigger Swift, and converts return types back to jsi::Value.
This double marshalling adds CPU overhead, triggers heap allocations, and increases binary size through generated Objective-C metadata.
Expo Modules API: Developer Ergonomics vs. Dispatch Overhead
The Expo Modules architecture prioritizes developer ergonomics through declarative Swift and Kotlin DSLs:
- Developers define native functionality using concise syntax (e.g.,
Function("sync") { ... }). - The runtime relies on an internal dynamic type-converter and reflection system atop JSI.
- While development velocity is high, runtime type resolution and dynamic argument inspection introduce measurable dispatch overhead during tight, high-frequency execution loops.
Nitro Modules: Nitrogen Codegen and Direct Swift 5.9+ C++ Interop
Nitro Modules bypass intermediary runtime abstractions by coupling JSI directly with Swift 5.9+ C++ interop:
1. Spec Declaration: Developers define an interface extending HybridObject<{ ios: 'swift', android: 'kotlin' }>.
2. Nitrogen Codegen: The Nitrogen CLI parses TypeScript ASTs and outputs:
- High-efficiency C++ JSI bindings inheriting directly from nitro::HybridObject.
- C++ header files exposed to Xcode's Swift compiler via -cxx-interoperability-mode=default.
3. Zero-Wrapper Swift Implementation: The engineer writes a pure Swift class conforming to the generated protocol.
4. Direct vtable Dispatch: At runtime, JavaScript calls on Hermes map straight to the C++ virtual table (vtable) pointer of the Swift class. There is no Objective-C runtime participation, no Foundation type translation, and zero memory duplication for primitive types and raw byte buffers.
Architectural Pipeline Diagram
flowchart TD
subgraph JS_Layer ["JavaScript / TypeScript Layer (Hermes VM)"]
TS_Spec["TypeScript Spec (.nitro.ts)"]
JS_App["Application Logic / UI Components"]
JS_Call["JSI HostObject Invocation"]
end
subgraph Codegen_Layer ["Build-Time: Nitrogen Toolchain"]
Nitrogen["Nitrogen Codegen CLI"]
CPP_JSI["C++ JSI Header (.hpp)"]
Swift_Interop["Swift 5.9+ C++ Interop Protocol"]
end
subgraph Native_Layer ["iOS Native Layer (Direct Execution)"]
VTable["C++ Virtual Method Table"]
Swift_Class["Swift Class: HybridObject"]
Hardware["Hardware: SQLite / Metal / Sensors"]
end
TS_Spec -->|AST Compilation| Nitrogen
Nitrogen -->|Generates| CPP_JSI
Nitrogen -->|Generates| Swift_Interop
JS_App -->|Direct Call| JS_Call
JS_Call -->|C++ Pointer Lookup| CPP_JSI
CPP_JSI -->|Direct vtable Dispatch| VTable
VTable -->|Zero-Copy Method Execution| Swift_Class
Swift_Class -->|Direct Native I/O| Hardware---
3. Microbenchmark Analysis: Dispatch Latencies and Throughput
To evaluate runtime performance across native architectures objectively, we analyze empirical data from the open-source NitroBenchmarks suite (authored by Marc Rousavy) alongside established community JSI profiling traces under production release compilation flags.
Test Harness and Environment Configuration
- Benchmark Suite:
mrousavy/NitroBenchmarks(open-source benchmark repository for React Native). - Primary Hardware Testbed: Physical Apple iPhone 15 Pro (Apple A17 Pro silicon, 8GB unified memory, iOS release compilation).
- Secondary Reference Platform: Standard modern Android reference device (Qualcomm Snapdragon 8 Gen 3 for Galaxy, 12GB RAM, Android release build).
- JavaScript Engine: Hermes JS Engine (bundled with React Native 0.76+), with bytecode pre-compiled.
- Sample Size & Methodology: 100,000 consecutive synchronous invocations measured via high-precision monotonic timing (
performance.now()), isolating raw dispatch overhead and type marshalling from background thread contention. - Payload Invocations Evaluated:
- Primitive Numeric Addition: addNumbers(a: number, b: number): number (measures pure dispatch and register passing).
- String Passing: addStrings(a: string, b: string): string (measures string allocation, memory layout, and UTF encoding translation across the language boundary).
Empirical Latency and Throughput Matrix
The following table details verified dispatch metrics recorded in the open-source NitroBenchmarks suite on physical iOS hardware (iPhone 15 Pro, Release Build):
| Architecture / Framework | Native Language Implementation | 100k Calls: addNumbers (Total Time) | Per-Call Latency (addNumbers) | 100k Calls: addStrings (Total Time) | Per-Call Latency (addStrings) | Relative Speedup vs. TM (Obj-C++) |
|---|---|---|---|---|---|---|
| Nitro Modules | Pure Swift (Swift 5.9+ C++ Interop) | 7.27 ms | ~72.7 ns | 29.94 ms | ~299.4 ns | ~15.9x faster (Numbers) / ~6.0x faster (Strings) |
| TurboModules (Pure C++) | Pure C++ (Direct JSI HostObject) | ~7.35 ms | ~73.5 ns | ~31.20 ms | ~312.0 ns | ~15.8x faster (Numbers) / ~5.7x faster (Strings) |
| TurboModules (Standard) | Objective-C++ Bridging to Swift | 115.86 ms | ~1,158.6 ns (~1.16 µs) | 179.02 ms | ~1,790.2 ns (~1.79 µs) | Baseline (1.0x) |
| Expo Modules API | Swift DSL Runtime | 434.85 ms | ~4,348.5 ns (~4.35 µs) | 429.53 ms | ~4,295.3 ns (~4.30 µs) | ~0.27x (~3.7x slower than TM) |
| Legacy Bridge (Async) | Objective-C (JSON Queue Serialized) | >4,000 ms | >40,000 ns (>40 µs) | >4,500 ms | >45,000 ns (>45 µs) | >34x slower than TM |
Dissecting the Microbenchmark Results
1. Sub-100ns Native Execution Floor: Nitro Modules match the performance of pure inline C++ JSI bindings. Because Nitrogen generates lightweight C++ structs that the Swift compiler accesses directly via bidirectional interop, Hermes calls execute as a direct indirect pointer lookup through the C++ vtable without Objective-C runtime participation or ARC autorelease pool allocations.
2. The Objective-C++ Indirection Tax: TurboModules communicating with Swift via Objective-C++ run roughly 15x slower on primitive addition (1,158.6 ns vs. 72.7 ns). This latency penalty stems directly from objc_msgSend selector dispatch, Objective-C ARC reference updates, and the allocation of intermediate Foundation objects (NSNumber, NSString) to bridge between C++ and Swift.
3. Expo Modules Evaluation: Expo Modules prioritize developer ergonomics through declarative DSL syntax. However, their dynamic argument inspection and runtime reflection layer introduce additional dispatch overhead (~4.35 µs per call). While completely imperceptible for discrete UI interactions, this overhead becomes a factor when scaling to high-frequency, frame-bound loops.
4. Android Platform Parity: On Android devices (such as Snapdragon 8 Gen 3 hardware), both TurboModules and Nitro Modules must traverse the Java Native Interface (JNI) boundary to reach Kotlin. Consequently, dispatch latency on Android is governed by JNI invocation costs (~120–180 ns per call) rather than language-layer wrappers. However, Nitro’s statically compiled JNI bindings avoid runtime reflection overhead, matching or slightly exceeding pure C++ TurboModule throughput.
---
4. High-Throughput Production Scenarios: Where Nanoseconds Impact P99
Nanosecond microbenchmarks translate into noticeable user-facing differences when mobile applications process sustained, high-frequency operations.
High-Frequency Offline Synchronization and Local CRDTs
Enterprise field platforms, healthcare tools, and inventory systems often operate offline-first. When establishing network connectivity, synchronization engines process batches of 10,000 to 50,000 conflict-free replicated data type (CRDT) mutation logs.
Processing 20,000 records via traditional Objective-C++ TurboModules incurs:
$$20{,}000 \times 1{,}158.6\text{ ns} \approx 23.17\text{ ms (pure bridge dispatch overhead)}$$
In a 60 FPS rendering pipeline (16.67 ms frame budget) or 120 FPS pipeline (8.33 ms frame budget), spending 23.17 ms purely on bridge indirection guarantees a dropped frame and visible UI hitching.
With Nitro Modules, that dispatch time drops to:
$$20{,}000 \times 72.7\text{ ns} \approx 1.45\text{ ms}$$
A dispatch duration of 1.45 ms consumes less than 9% of a standard 16.67 ms frame budget, leaving ample headroom for React reconciliation, layout calculations, and GPU rendering. By using Nitro’s zero-copy memory buffers, local persistence engines (such as SQLite WAL mode or custom C++ engines) ingest records without triggering JavaScript garbage collection pauses.
Real-Time Computer Vision and Audio Processing
Applications handling camera frame analysis, barcode scanning, or audio FFT processing receive raw frame buffers every 8.33ms (120 FPS) or 16.6ms (60 FPS). Passing frame data across standard bridges requires base64 serialization or disk I/O. Nitro Modules utilize ArrayBufferHolder, mapping Swift directly to the underlying raw bytes of Hermes ArrayBuffer instances without memory duplication.
Background Notification Ingestion and Push Queues
Mobile platforms processing high-volume push notifications or sensor telemetry must parse incoming payloads efficiently. Waking the full JavaScript runtime to parse JSON payloads drains battery and risks iOS BackgroundTasks watchdog termination. Nitro Modules enable native Swift services to filter and deduplicate payloads in native memory, passing consolidated typed structs to JavaScript only when necessary.
Strategic Context: React Native vs. Flutter FFI
Flutter has historically claimed an advantage in low-level execution due to dart:ffi, which invokes C/C++ routines directly. However, dart:ffi requires manual binding construction, C struct alignment maintenance, and lacks high-level Swift ergonomics. Nitro Modules bridge this gap: React Native matches Flutter's FFI speed while maintaining idiomatic Swift 5.9+ architectures.
When architecting high-throughput mobile platforms, technology leaders often partner with Wise Hustlers for enterprise mobile development services to audit native thread contention, optimize JSI synchronization paths, and implement zero-copy native pipelines.
---
5. Technical Implementation: Nitrogen Codegen and Swift HybridObjects
Below is a complete implementation of a high-throughput, zero-copy data synchronization module: DataSyncEngine.
Step 1: TypeScript Specification Definition
Define the interface spec in src/specs/DataSyncEngine.nitro.ts:
import { type HybridObject } from 'react-native-nitro-modules';
export interface MutationRecord {
id: string;
table: string;
payload: string;
timestamp: number;
crc32: number;
}
export interface SyncEngineStats {
processedCount: number;
unresolvedConflicts: number;
throughputOpsPerSec: number;
}
export interface DataSyncEngine extends HybridObject<{ ios: 'swift'; android: 'kotlin' }> {
/** Synchronous mutation validation via direct C++ vtable lookup */
verifyRecordSynchronous(record: MutationRecord): boolean;
/** Zero-copy batch buffer ingestion from Hermes ArrayBuffer */
ingestBinaryMutations(buffer: ArrayBuffer): number;
/** Non-blocking asynchronous reconciliation on an iOS background queue */
reconcileMutationsAsync(remoteBatchId: string): Promise<SyncEngineStats>;
}Step 2: Compiling via Nitrogen Codegen
Execute Nitrogen to generate C++ JSI host headers and Swift bridging protocols:
npx nitro-codegen --spec ./src/specs/DataSyncEngine.nitro.ts --out ./nitrogenNitrogen outputs:
1. HybridDataSyncEngineSpec.hpp: Abstract C++ struct inheriting from nitro::HybridObject.
2. HybridDataSyncEngineSpec-Swift-Cxx-Bridge.hpp: Swift 5.9+ C++ interop header.
3. HybridDataSyncEngineSpec.swift: Swift protocol defining typed method signatures.
Step 3: Native Swift Implementation with C++ Interoperability
In your iOS project, implement HybridDataSyncEngine.swift. Note the complete absence of @objc, NSObject, or manual pointer casting:
import Foundation
import NitroModules
public final class HybridDataSyncEngine: HybridDataSyncEngineSpec {
private let executionQueue = DispatchQueue(label: "com.wisehustlers.sync.worker", qos: .userInitiated)
private var totalProcessedCount: Double = 0
private var totalConflictCount: Double = 0
public init() {}
// Synchronous execution path: direct C++ vtable dispatch into pure Swift
public func verifyRecordSynchronous(record: MutationRecord) throws -> Bool {
let calculatedChecksum = calculateChecksum(for: record.payload)
return calculatedChecksum == UInt32(record.crc32)
}
// Zero-copy binary buffer ingestion: direct pointer mapping from Hermes ArrayBuffer
public func ingestBinaryMutations(buffer: ArrayBufferHolder) throws -> Double {
guard let rawMemoryPointer = buffer.data, buffer.size > 0 else {
return 0
}
let rawBuffer = UnsafeRawBufferPointer(start: rawMemoryPointer, count: buffer.size)
let mutationsExtracted = parseBinaryFrames(from: rawBuffer)
self.totalProcessedCount += Double(mutationsExtracted)
return Double(mutationsExtracted)
}
// Asynchronous reconciliation: non-blocking thread orchestration returning Promise
public func reconcileMutationsAsync(remoteBatchId: String) -> Promise<SyncEngineStats> {
return Promise { [weak self] resolver in
guard let self = self else {
resolver.reject(withError: NSError(
domain: "DataSyncEngine",
code: 500,
userInfo: [NSLocalizedDescriptionKey: "Instance deallocated"]
))
return
}
self.executionQueue.async {
let startTimestamp = DispatchTime.now()
let unresolved = self.resolveConflicts(forBatch: remoteBatchId)
self.totalConflictCount += Double(unresolved)
let finishTimestamp = DispatchTime.now()
let elapsedNanoseconds = finishTimestamp.uptimeNanoseconds - startTimestamp.uptimeNanoseconds
let elapsedSeconds = Double(elapsedNanoseconds) / 1_000_000_000.0
let throughput = elapsedSeconds > 0 ? (self.totalProcessedCount / elapsedSeconds) : 0
let stats = SyncEngineStats(
processedCount: self.totalProcessedCount,
unresolvedConflicts: self.totalConflictCount,
throughputOpsPerSec: throughput
)
resolver.resolve(withResult: stats)
}
}
}
private func calculateChecksum(for string: String) -> UInt32 {
var crc: UInt32 = 0xFFFFFFFF
for byte in string.utf8 {
let tableIndex = Int((crc ^ UInt32(byte)) & 0xFF)
crc = (crc >> 8) ^ crc32LookupTable[tableIndex]
}
return ~crc
}
private func parseBinaryFrames(from buffer: UnsafeRawBufferPointer) -> Int {
var parsedFrames = 0
var currentOffset = 0
while currentOffset + 16 <= buffer.count {
currentOffset += 16
parsedFrames += 1
}
return parsedFrames
}
private func resolveConflicts(forBatch batchId: String) -> Int {
return 0
}
}
private let crc32LookupTable: [UInt32] = {
(0...255).map { index -> UInt32 in
var entry = UInt32(index)
for _ in 0..<8 {
entry = (entry & 1 != 0) ? (0xEDB88320 ^ (entry >> 1)) : (entry >> 1)
}
return entry
}
}()---
6. Executive Decision Matrix and ROI Evaluation
Selecting an architectural standard requires balancing execution speed with long-term engineering maintenance costs.
Multi-Dimensional Architectural Comparison
| Architectural Dimension | Nitro Modules | Meta TurboModules | Expo Modules API |
|---|---|---|---|
| Primary Languages | TypeScript + Swift 5.9+ / Kotlin / C++ | TypeScript + C++ / Obj-C++ / Java | TypeScript + Swift DSL / Kotlin DSL |
| Dispatch Latency (Sync) | ~73 ns (Swift) / ~74 ns (Pure C++) | ~1,158 ns (Obj-C++ to Swift) / ~74 ns (Pure C++) | ~4,350 ns (Swift DSL) |
| Developer Velocity (Swift/Kotlin) | High (Clean protocols, no wrappers) | Moderate (Requires C++ or Obj-C++ glue) | Very High (Declarative DSL syntax) |
| Codegen Mechanism | Nitrogen (Fast TypeScript AST parser) | Meta Codegen (Gradle/CocoaPods integration) | Expo CLI / Autolinking runtime |
| Binary Size Overhead | Minimal (Lightweight C++ headers, no Obj-C metadata) | Moderate (Obj-C++ metadata and selector tables) | Moderate (DSL runtime and reflection tables) |
| Direct Zero-Copy Memory Access | Yes (ArrayBufferHolder) | Complex (Manual JSI typed array wrappers) | Limited (Standard TypedArray wrappers) |
| Ecosystem Maturity (2026) | Rapid enterprise adoption | Universal default standard in RN core | Standard within Expo ecosystem |
Engineering Team Capacity and Skillset Readiness
- Teams with Pure Swift / Kotlin Talent: Nitro Modules offer clear advantages. Engineers write idiomatic Swift 5.9+ and Kotlin without managing Objective-C++ bridging files or C++ template metaprogramming.
- Teams with Cross-Platform C++ Core Engines: Pure C++ TurboModules or direct Nitro C++ HybridObjects remain the standard choice when sharing an existing C++ audio or graphics core across mobile, desktop, and embedded platforms.
- Standard SaaS Applications: For teams building standard UI forms and basic API clients, standard TurboModules or Expo Modules provide sufficient performance.
Falsifiability and Diagnostic Health Checks
To ensure architectural decisions deliver expected returns, engineering leadership should establish falsification criteria:
1. Main Thread Budget Violations (Frame Budget > 16.6ms):
Diagnostic Signal*: If synchronous HybridObject invocations consume more than 1.5ms on the JavaScript thread during gesture interactions, synchronous calls are creating micro-stutters.
Verification*: Profile using the Hermes Sampling Profiler. If HybridDataSyncEngine::verifyRecordSynchronous occupies more than 4% of thread runtime during interactive scrolling, convert the method to an asynchronous queue dispatch.
2. Memory Leaks Across the Swift-Hermes Boundary:
Diagnostic Signal*: Monotonic growth in Resident Set Size (RSS) during continuous data synchronization indicates that ArrayBufferHolder or Swift ARC closures are retaining memory past the Hermes garbage collection cycle.
Verification*: Track allocations in Xcode Instruments (Allocations and Leaks). Unresolved retain cycles between the C++ host wrapper and Swift instances appear as persistent heap allocations surviving GC sweeps.
3. Compiler and CI/CD Fragility:
Diagnostic Signal*: Build failures caused by Swift 5.9/6.0 C++ interoperability flags (-cxx-interoperability-mode) breaking third-party dependencies in the same Xcode target.
Verification*: If resolving toolchain incompatibilities requires more than 4 engineering hours per release sprint, the maintenance overhead negates the runtime performance gain.
---
7. Migration Playbook: Transitioning to Nitro Modules
For organizations with established React Native codebases, migrating from legacy bridges or TurboModules to Nitro Modules should follow a phased approach:
flowchart LR
P1["Phase 1: Profile & Isolate"] --> P2["Phase 2: Hybrid Coexistence"]
P2 --> P3["Phase 3: Spec & Native Refactor"]
P3 --> P4["Phase 4: CI/CD Hardening"]
classDef stage fill:#f4f6f8,stroke:#334155,stroke-width:2px;
class P1,P2,P3,P4 stage;Phase 1: Performance Profiling and Bottleneck Isolation
- Profile application paths using Hermes Sampling Profiler and Xcode Instruments.
- Identify high-frequency native modules (>500 calls/second) or modules handling heavy data transfers (e.g., local storage, camera frames, cryptography).
- Maintain standard modules (e.g., haptic feedback, device info) on existing implementations to avoid unnecessary refactoring.
Phase 2: Dual-Architecture Hybrid Coexistence
- Install
react-native-nitro-modulesalongside standard TurboModules. - Both architectures coexist without conflict in the same application binary; Hermes manages both host object types concurrently without collisions.
Phase 3: Incremental Refactoring of Mission-Critical Modules
- Define strict TypeScript specs using
.nitro.ts. - Run Nitrogen codegen to generate C++ bindings and Swift protocols.
- Implement business logic in pure Swift classes, retiring legacy
.mmfiles.
Phase 4: Toolchain and CI/CD Hardening
- Configure CI pipelines (Xcode Cloud, GitHub Actions) with Xcode 15.3+ and Swift 5.9+ enabled.
- Configure Android NDK r26b+ in
android/app/build.gradleto support modern C++20 standards. - Implement automated performance tests to prevent regression in bridge dispatch latency.
---
8. Frequently Asked Questions
Does adopting Nitro Modules break compatibility with standard React Native New Architecture libraries?
No. Nitro Modules build on the JavaScript Interface (JSI), the core foundation of React Native's New Architecture. Nitro Modules run concurrently alongside standard TurboModules, Expo Modules, and Fabric components within the same Hermes instance without configuration conflicts.
How does Nitro Modules handle Android native interop compared to iOS Swift-C++ interop?
On Android, Nitrogen generates direct C++ JNI (Java Native Interface) code that binds directly to Kotlin or C++. While Android does not yet offer a direct equivalent to Swift's native C++ interop compiler feature, Nitrogen's auto-generated JNI code minimizes local reference table allocations, matching the performance of pure C++ TurboModules.
Can Nitro Modules pass raw binary data and typed arrays without memory copies?
Yes. Nitro Modules support ArrayBufferHolder, which maps directly to the underlying memory address of a JavaScript ArrayBuffer or Uint8Array. The Swift layer reads and writes to this memory space via UnsafeRawBufferPointer without allocating intermediary Foundation objects (NSData) or copying bytes.
What are the build-time implications of Nitrogen codegen compared to React Native Codegen?
Nitrogen is substantially faster than standard react-native-codegen. Because Nitrogen is a targeted TypeScript parser focused exclusively on native module specifications, it generates headers in milliseconds. By eliminating Objective-C++ translation code, overall compilation time in Xcode is typically reduced compared to complex TurboModule implementations.
How does Swift 6 strict concurrency affect Nitro Modules HybridObjects?
HybridObjects implemented in Swift operate smoothly within modern Swift concurrency models. When handling asynchronous operations, HybridObjects return Promise<T> structures that resolve safely from background dispatch queues. With Swift 6 strict concurrency enabled, developers define HybridObjects with explicit Sendable conformance or isolate shared state within Swift actors, preventing data races at compile time.
---
9. Sources
- Nitro Modules Documentation & Specification – Margelo / Marc Rousavy
- NitroBenchmarks Open-Source Benchmark Repository – Marc Rousavy
- React Native New Architecture Guide – Meta Platforms Open Source
- Swift.org C++ Interoperability Project – Apple / Swift.org
- Hermes JavaScript Engine Architecture – Meta Platforms
- Apple Developer: Calling APIs Across Language Boundaries – Apple Inc.