Skip to content

Integration with React Native #133

Description

@thomlucc

Edited to clarify what's involved in this.

What we mean by "integration" is specifically at the JavaScript level. When running in a React Native app, we want Babylon Native to be able to "piggyback" on the JavaScript environment that's already being created and used by React Native. There are quite a few challenges to making that happen, many of which were motivating factors behind the rearchitecting work done in #157. However, a number of challenges remain (and more are likely to be discovered).

  • We need to be able to "inject" external JavaScript engines into our N-API integration point so that consuming applications can, if they want to, supply their own JS engines. As pertains to React Native, this is to allow Babylon Native to be built against the same JS engine binaries React Native uses without having to make them a part of Babylon Native itself.
  • Babylon Native needs to be able to function even when doesn't actually own the JavaScript engine or thread. This was the primary motivation behind Plugin Refactor #157 (specifically the JsRuntime type), but associated problems include things like creating a dispatch method to allow Babylon Native plugins to get to the JavaScript thread even when we don't control it. These issues must likely be solved separately for every platform/integration point (relevantly, for React Native on Android and for React Native on iOS).
  • We need to flesh out our understanding of the "developer story" for using Babylon Native with React Native. This should include a consumable API as well as understanding how we recommend adding Babylon Native to a React Native app.
  • If our "developer story" doesn't involve building from source every time, we may need to figure out a distribution mechanism. NPM? Loose JARs?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions