npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

uniffi-bindgen-react-native

v0.29.3-1

Published

Uniffi bindings generator for calling Rust from React Native

Readme

CI Compatibility (Android) Compatibility (iOS) Compatibility (Android, latest) Compatibility (iOS, latest)

🦀 uniffi-bindgen-react-native

uniffi-bindgen-react-native is a tool that generates TypeScript bindings for Rust code, making it usable in React Native apps and web pages. It builds on UniFFI, Mozilla's bindings generator ecosystem.

With this tool, you can write your business logic once in Rust and access it seamlessly from TypeScript, whether you're developing for mobile platforms or the web.

UniFFI provides procedural macros to describe your API, prioritizing expressivity and memory safety. This makes it ideal for portability.

✨ Features

It provides tooling to generate safe and performant TypeScript to access Rust from:

  • 📱 React Native
    • with JSI C++ to call Rust from TypeScript and back again, and
    • a Turbo-Module that installs the bindings into a running React Native library.
  • 🌐 Web pages
    • with a WASM binding crate

All using the same proc macros: you annotate your Rust once, and build for Android, iOS and the Web.

Javascript hosts the Rust library, and uniffi-bindgen-react-native and uniffi facilitate the communication between the two:

  • Same thread calling across the FFI from Javascript to Rust.
  • Async calls from Javascript to Rust
  • Same thread callbacks from Rust to Javascript
  • Async callbacks from Rust to Javascript
  • Pass by Reference (for "Objects")
  • Pass by Value (for "Records")
  • Enums and tagged unions

Why use uniffi-bindgen-react-native instead of wasm-bindgen?

  • uniffi-bindgen-react-native generates a wasm-bindgen crate, from uniffi annotations.
  • when you come to use your Rust crate in another context (say, from Python, or Kotlin, or React Native), then you can generate FFIs for those platforms, all with the same uniffi annotations.

🚀 Getting Started

If you're ready to start, then begin with a step-by-step tutorial to make a Rust turbo-module and then run it in web page with WASM.

If you're new to UniFFI, then the UniFFI user guide or the UniFFI examples are interesting places to start.

🤔 Why uniffi-bindgen-react-native?

  • 🧩 Spend more time writing TypeScript and Rust, less time hand-writing FFIs
  • 🌍 Your Rust SDK is portable across multiple languages

Who is using uniffi-bindgen-react-native?

Prior art and related projects

Notice

Now uniffi-bindgen-react-native supports WASM, the React Native no longer seems appropriate. In the near future, we'll change the name to uniffi-bindgen-javascript. Backwards compatibility will be ensured.

Contributing

If this tool sounds interesting to you, please help us develop it! You can:

Code of Conduct

This project is governed by Mozilla's Community Participation Guidelines.

Funding

uniffi-bindgen-react-native is led by James Hugman, with deep collaboration from the Filament engineering team, funded by Filament and Mozilla.

License

MPL-2.0