Open chrisglein opened 4 days ago
Previously there had been issues with compilation of this particular area with MSVC vs. Clang. But we believe that has been resolved (and in fact the file has a patch override) and is used in the integration tests. Should be a trivial change to add the header to the nuget project.
From this discussion: https://github.com/microsoft/react-native-windows/discussions/13985
Hi, I have been studying #10909 and the JSI TurboModule stuff in
vnext/Microsoft.ReactNative.IntegrationTests
for some time and finally decided to give a shot at making a TurboModule with Codegen and JSI.I made a lib using create-react-native-library (https://github.com/microsoft/react-native-windows/issues/13884#issuecomment-2388653591):
Ran react-native-windows-codgen with flag
--modulesCxx
to get the JSI codegen:and made a simple implementation.
windows\rnwturbo\rnwturbo.{h|cpp}:
I don't know how to autolink JSI TurboModules, but as a quick hack I changed
example\windows\rnwturboExample\rnwturboExample.cpp
in the example app to manually link with theRnwturboPackageProvider
, as shown in https://github.com/microsoft/react-native-windows/blob/a3fc8a9c0893ced961677523820060f3df8947fb/vnext/Microsoft.ReactNative.IntegrationTests/JsiTurboModuleTests.cpp#L155:Now, everything is set as far as I understand. I also later found the very helpful comments in #13886 confirming my understanding of things.
But when running
yarn example windows --no-autolink
I get this:So this is coming from the JSI codegen file that react-native-windows-codegen creates and it's failing to import Meta's JSI file(s). I've tried changing the import path to some other variants but cannot get the file to be imported.
For clarity, the file just looks like normal JSI codegen code: