Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Create hello world turbo module for react native #35

Open
4 tasks done
Tracked by #13
TimoGlastra opened this issue Oct 10, 2021 · 3 comments
Open
4 tasks done
Tracked by #13

Create hello world turbo module for react native #35

TimoGlastra opened this issue Oct 10, 2021 · 3 comments
Assignees
Labels
mobile-component native code Item that involves writing native code poc

Comments

@TimoGlastra
Copy link
Member

TimoGlastra commented Oct 10, 2021

Using react-native-tscodegen and writing the native module in c++. Should also be consumable as library. RN 0.65 and 0.66 have made improvements I think to using JSI and TurboModules. This is just to validate if we can already use it to build libraries. It's not clear to me yet how to do this.

The main thing I'm having trouble finding is calling C++ directly (so no Java/Swift in between)

Projects already using JSI:

Otherwise looking at Kotlin / Swift would maybe be a good option (also for uniffi-rs)

  • Create JSI library
  • Call JSI method on Android
  • Call JSI method on iOS
  • Use react-native-tscodegen to generate c++ interface from TS interface
@TimoGlastra
Copy link
Member Author

@TimoGlastra
Copy link
Member Author

@berendsliedrecht
Copy link
Member

https://github.com/blu3beri/react-native-turbomodule-tscodegen

Android still needs to link for tscodegen to turbomodule. Will work on this soon.

@TimoGlastra TimoGlastra reopened this Dec 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
mobile-component native code Item that involves writing native code poc
Projects
None yet
Development

No branches or pull requests

2 participants