Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

Typescript logo ↔️ WASM logo

uniffi-bindgen-react-native is the project that houses the bindings generators for WASM and 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:

  • for Hermes via JSI, and to generate the code to create turbo-modules.
  • for WASM, using wasm-bindgen, and the WASM crate.

Warning

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