In a real app
An Expo module is created with npx create-expo-module, or locally inside the project with npx create-expo-module --local, which puts it under modules/. It is described by an expo-module.config.json file at its root listing platforms and module classes; that file is what Expo’s autolinking reads, independently of the React Native CLI autolinking. iOS code is Swift (a Module subclass with a definition block), Android code is Kotlin, and JavaScript loads the module with requireNativeModule.
Choosing between Expo Modules, Turbo Modules, and Nitro comes down to what you are writing: shared C++, pick Turbo Modules; very frequent latency-sensitive calls (frame processing, heavy synchronous reads), Nitro; ordinary native access with little boilerplate, the Expo Modules API. The Expo docs state performance comparable to Turbo Modules, since both go through JSI, and the Android microbenchmarks published with SDK 58 even put Expo Modules 2.0 ahead of a Turbo Module in all twelve cases measured. The price of entry is a dependency on the expo package and a few hundred kilobytes in the binary.
Expo Modules 2.0, in beta on iOS and Android in SDK 58 after an experimental iOS macros phase in SDK 57, replaces the DSL with annotations on a plain Swift or Kotlin class. Expo reports synchronous calls 2.5 to 5.6 times faster than the DSL on iOS. The JavaScript contract does not change, so you can migrate one module at a time.
Related terms
Turbo Modules
Native modules in the New Architecture: a TypeScript spec, code generated by Codegen, and lazy loading through JSI.
Nitro Modules
Margelo’s framework for writing native modules in Swift, Kotlin, or C++ exposed to JavaScript through JSI, with bindings generated from TypeScript.
Autolinking
The mechanism that discovers native libraries in node_modules and adds them to the Podfile and Gradle with no manual edits.
Config plugin
A JavaScript function declared in app.json that modifies the native projects prebuild generates (Info.plist, manifest, Gradle, Podfile).
JSI (JavaScript Interface)
The C++ API that lets JavaScript hold direct references to native objects with no serialization: the foundation of the New Architecture.