[Feature] Support for Windows (react-native-windows)
I see mention on iOS and Android in the doc but no mention of RNW.
Is there a way to get this working on windows?
Yes, everything is cross-platform so it does work on Windows.
The only thing that we need to change is to get the turbomodule/ autolinked - which is just a single module that acts as an entry point for Nitro.
Nitro only needs reference to the jsi::Runtime and a CallInvoker - that's it.
To add support to another platform, you just need to call margelo::nitro::install(...) in a Runtime. This will install global.NitroModulesProxy into the Runtime's global.
https://github.com/mrousavy/nitro/blob/c0ae25bef6710894c1314f714638b38ca650c66b/packages/react-native-nitro-modules/cpp/entrypoint/InstallNitro.hpp#L16-L29
cc @shirakaba
Here is my writeup of how to write a react-native-windows "attributed" native module (which can be installed as either a NativeModule or TurboModule) that installs a JSI HostObject on the JS global.
I'd help out, but I don't have even a spare half-hour from now until mid-November ðŸ«
Nitro only needs reference to the jsi::Runtime and a CallInvoker - that's it.
Here is my writeup of how to get access to callinvoker using the above approach.
This is really helpful, thanks Jamie!!
Windows support in Nitro is unfortunately also lower on my priority list for now because of a lot of other things (including VisionCamera stuff), so I don't think I can implement this anytime soon.
If anyone wants to tackle this, I can take time to review PRs and release it though!
this would be useful to look at again with nitro adoption in a bunch of places. will take a look at building a pr based on on the above. bookmarking this. love vision btw ty for the hard work.
@kziemski , did you have a chance to look into this yet? We're also interested in this development.