uniffi-rs is a suite of projects to allow Rust to be used from other languages. It was started at Mozilla to facilitate building cross-platform components in Rust which could be run on Android and iOS.

It has since grown to support for other languages not in use at Mozilla.

React Native Logo + Rust Logo

uniffi-bindgen-react-native is the project that houses the bindings generators for react-native.

It supports all language features that uniffi-rs supports, including:

  • calling functions from Typescript to Rust, synchronous and asynchronous.
  • calling functions from Rust to Typescript, synchronous and asynchronous.
  • objects with methods, including:
    • garbage collection integration.
    • uniffi traits
  • custom types

It contains tooling to generate bindings from Hermes via JSI, and to generate the code to create turbo-modules.

Warning

This project is still in early development, and should not yet be used in production.