Open TimoGlastra opened 2 years ago
Thanks for sharing, @TimoGlastra that's very cool. I also find the JNI/obj-c bindings a bit redundant, and it would be cool to try and call C++ directly. I didn't see a way with codegen to do so, but their documentation is not great, so there might be one. I can try to look at it, but I would also love if someone would try to take a stab at it.
Worst-case scenario one could use the turbo module to hoist an install step that installs pure C++ JSI bindings. At least until codegen supports generating pure C++.
Can I ask an update on this? What is the right way to wrap a C library in a react native module today?
I read somewhere on twitter that C++ support was coming to Turbo Modules, no idea if it is out though
Yes indeed but can't find any tutorial. Thanks anyway
https://www.youtube.com/channel/UCHxMuqeVlkDgKG5cs99FH2Q, somewhere in there the videos deal with async work and C++ bindings, can't remember which one. But this is off topic to this issue.
Would it be possible to extend this example with codegen that directly invokes c++ methods from JS? Not sure if that's already possible.
We've created a JSI library in c++ with a minimal obj-c/java boilerplate where methods are implemented in c++ directly (no need to expose it in obj-c/java) but it isn't set up to work with codegen yet (manual JSI setup).
See here for the library: https://github.com/animo/react-native-bbs-signatures