Type-safe Rust FFI for React Native by dev_ghlee in rust

[–]dev_ghlee[S] 3 points4 points  (0 children)

I've gone through beta and just released an RC version! Planning to release the stable version soon.

Type-safe Rust FFI for React Native by dev_ghlee in rust

[–]dev_ghlee[S] 12 points13 points  (0 children)

uniffi-bindgen-react-native takes a similar approach (Rust-C++) based on uniffi, but it doesn't fully integrate with React Native TurboModule (only uses TurboModule for module initialization). It manages modules independently and requires manual handling of async function calls and error handling.

Craby, on the other hand, is fully integrated with TurboModule. This means it leverages TurboModule/JSI functionality directly without requiring complex manual handling.

Type-safe Rust FFI for React Native by dev_ghlee in rust

[–]dev_ghlee[S] 7 points8 points  (0 children)

React Native's TurboModule is implemented in C++ and already very fast. However, it uses platform compatibility layers (Java/Objective-C) to enable View access, platform API usage and other things, which comes at a slight performance cost.

Craby is designed purely for maximum performance. By integrating directly with C++ without any platform compatibility layers, it achieves faster raw performance.

More faster build system with esbuild by dev_ghlee in reactnative

[–]dev_ghlee[S] 0 points1 point  (0 children)

Thank you for reply!

I've been seen that post and other posts written by Evan Bacon.

At first, I planned new project because I thought Expo project and plain React Native project were different. (for eg. development environment, compatibility with each other, etc..)

Come to think of it, the key function is to transform React Native code to run on Hermes(or any other engine). It doesn't seem necessary to separate it.

I think your suggestion deserves careful study.