Make React-Native Turbo Modules out of Rust
See the codeuniffi-bindgen-react-native is a tool that generates TypeScript bindings for Rust code, making it usable in React Native apps, web pages, and Node.js. 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, the web or servers.
UniFFI provides procedural macros to describe your API, prioritizing expressivity and memory safety. This makes it ideal for portability.
uniffi-bindgen-react-native (npm) — CLI (ubrn), tooling, and the
legacy-named runtime that older generated code imports from.@ubjs/core (npm) — same runtime bytes, new identity. New generated
code imports from here. See typescript/README.md.@ubjs/node (npm) — N-API runtime backend; required for Node and Bun
consumers of generated bindings. See runtimes/napi/README.md.It provides tooling to generate safe and performant TypeScript to access Rust from:
@ubjs/node N-API runtime, loading your compiled Rust cdylib at runtime. See the Node.js reference.All using the same proc macros: you annotate your Rust once, and build for Android, iOS, the Web, and Node.js.
Javascript hosts the Rust library, and uniffi-bindgen-react-native and uniffi facilitate the communication between the two:
uniffi-bindgen-react-native instead of wasm-bindgen?uniffi-bindgen-react-native generates a wasm-bindgen crate, from uniffi annotations.uniffi annotations.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.
uniffi-bindgen-react-native?uniffi-bindgen-react-native?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.
If this tool sounds interesting to you, please help us develop it! You can:
This project is governed by Mozilla's Community Participation Guidelines.
uniffi-bindgen-react-native is led by James Hugman, with deep collaboration from the Filament engineering team, funded by:
4,533 followers · starred Dec 2024
3,803 followers · starred Nov 2024
1,469 followers · starred Dec 2024
1,573 followers · starred Nov 2024
Make React-Native Turbo Modules out of Rust
See the codeuniffi-bindgen-react-native is a tool that generates TypeScript bindings for Rust code, making it usable in React Native apps, web pages, and Node.js. 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, the web or servers.
UniFFI provides procedural macros to describe your API, prioritizing expressivity and memory safety. This makes it ideal for portability.
uniffi-bindgen-react-native (npm) — CLI (ubrn), tooling, and the
legacy-named runtime that older generated code imports from.@ubjs/core (npm) — same runtime bytes, new identity. New generated
code imports from here. See typescript/README.md.@ubjs/node (npm) — N-API runtime backend; required for Node and Bun
consumers of generated bindings. See runtimes/napi/README.md.It provides tooling to generate safe and performant TypeScript to access Rust from:
@ubjs/node N-API runtime, loading your compiled Rust cdylib at runtime. See the Node.js reference.All using the same proc macros: you annotate your Rust once, and build for Android, iOS, the Web, and Node.js.
Javascript hosts the Rust library, and uniffi-bindgen-react-native and uniffi facilitate the communication between the two:
uniffi-bindgen-react-native instead of wasm-bindgen?uniffi-bindgen-react-native generates a wasm-bindgen crate, from uniffi annotations.uniffi annotations.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.
uniffi-bindgen-react-native?uniffi-bindgen-react-native?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.
If this tool sounds interesting to you, please help us develop it! You can:
This project is governed by Mozilla's Community Participation Guidelines.
uniffi-bindgen-react-native is led by James Hugman, with deep collaboration from the Filament engineering team, funded by:
4,533 followers · starred Dec 2024
3,803 followers · starred Nov 2024
1,469 followers · starred Dec 2024
1,573 followers · starred Nov 2024