expo-modules-rs
Rust SDK for writing Expo native modules that integrate directly with the JavaScript Interface (JSI) runtime.
This crate provides:
- The
ExpoModuletrait andModuleBuilderfor defining modules JsValuetypes and conversion traits (FromJsValue,IntoJsValue)- The cxx bridge to the JSI C++ layer
- The
#[expo_module]and#[derive(ExpoRecord)]proc macros
Architecture
+---------------+ +----------------+ +----------------+
| JavaScript |---->| JSI (C++) |---->| Rust Module |
| (Hermes) |<----| jsi_shim.cpp |<----| (your crate) |
+---------------+ +----------------+ +----------------+
| | |
JS calls cxx bridge ExpoModule
module.fn() FfiValue trait impl
Quick Start
use *;
;