Skip to content

Enable react-native-windows support #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks done
chrisfromwork opened this issue Nov 18, 2020 · 3 comments · Fixed by #137
Closed
4 tasks done

Enable react-native-windows support #116

chrisfromwork opened this issue Nov 18, 2020 · 3 comments · Fixed by #137
Assignees

Comments

@chrisfromwork
Copy link
Contributor

chrisfromwork commented Nov 18, 2020

We are starting on the process of enabling react-native-windows support. We will use this issue to track progress.

Some known requirements:

  • Wrap react-native-windows jsi runtime with NAPI
  • Obtain javascript thread for animation callback logic
  • Implement BabylonReactNative native module components
  • Create BabylonReactNative windows package with precompiled native module binaries
@chrisfromwork chrisfromwork self-assigned this Nov 18, 2020
@chrisfromwork
Copy link
Contributor Author

microsoft/react-native-windows#6582

This pull request should give us access to the react-native-windows jsi runtime. It's unclear what additional work will be needed to get things working with NAPI

@chrisfromwork
Copy link
Contributor Author

chrisfromwork commented Dec 1, 2020

Work is out of the following branch:
https://github.com/chrisfromwork/BabylonReactNative/tree/uwp

Building a local version of react-native-windows based on the following PR reveled some more issues:
microsoft/react-native-windows#6617

  1. bx.lib (bgfx dependencies) consumes the windows runtime for threading logic. This conflicts with building winmd c++ winrt dlls. It seems fairly straight forward to use non-windows runtime (c++/cx) logic to setup threading. We may need to contribute some sort of c++ winrt friendly bx.lib definition to bgfx.
  2. react-native-windows has a bug in JsiApi.cpp where the s_jsiRuntimeMap is not correctly populated outside of unit tests. This causes napi population of BabylonNative components to fail. This should be a straight forward fix, but may take some time to get back into the react-native-windows codebase

at this point, calling logic on both the ui and javascript thread in react-native-windows native module definition seems to work correctly

@chrisfromwork
Copy link
Contributor Author

chrisfromwork commented Dec 18, 2020

At this point we have a working prototype for UWP. There are a few dependencies we will be waiting on:

@chrisfromwork chrisfromwork linked a pull request Jan 19, 2021 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant