Skip to content
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

realm for react-native-windows #1

Open
rozele opened this issue Aug 16, 2017 · 3 comments
Open

realm for react-native-windows #1

rozele opened this issue Aug 16, 2017 · 3 comments
Assignees
Labels

Comments

@rozele
Copy link
Member

rozele commented Aug 16, 2017

No description provided.

@rozele
Copy link
Member Author

rozele commented Aug 17, 2017

After a bit of discovery, implementation of this module is a bit more challenging than initially thought. Realm is quite a bit different from other native modules in that it injects a hook to add native callbacks in JavaScriptCore when the JSC runtime is first initialized.

We'll need to do the following at least:

  1. Write the Chakra(Core) equivalent of https://github.com/realm/realm-js/tree/master/src/jsc and https://github.com/realm/realm-js/tree/master/src/node.
  2. Add .vcxproj build files that are compatible with UWP (unfortunately node-gyp only generates build files that work on Win32)
  3. Establish a mechanism for Realm to integrate the native callbacks in Chakra(Core)

I've reached out to Realm for guidance on the first two, and it may be something we can collaborate on.

Regarding the third part, I think we can unseal the ChakraJavaScriptExecutor and allow realm to thread through a custom JavaScriptExecutor that is initialized with the native callbacks in Chakra. This approach will only support one module that extends the JS runtime at a time, so it would be better to add some mixin architecture or native JavaScript module hooks, but it will work in the immediate term.

@jakallergis
Copy link

@rozele is there any progress on that?

@rozele
Copy link
Member Author

rozele commented Jul 18, 2018

@jakallergis - no, but I think some folks have had success writing a native module for realm that uses the NuGet package. That approach does lose some of the perf benefits because of communication over the bridge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants