react-native icon indicating copy to clipboard operation
react-native copied to clipboard

introduce native api to access RuntimeExecutor

Open philIip opened this issue 1 year ago • 7 comments

Summary: Changelog: [Android][Added] - introduce native api to access RuntimeExecutor

This is the android equivalent of PR#42758.

From PR#42758

The goal of this API is to provide a safe way to access the jsi::runtime in bridgeless mode. The decision to limit access to the runtime in bridgeless was a conscious one - the runtime pointer is not thread-safe and its lifecycle must be managed correctly by owners.

However, interacting with the runtime is an advanced use case we would want to support. Our recommended ways to access the runtime in bridgeless mode is either 1) via the RuntimeExecutor, or 2) via a C++ TurboModule.

This diff introduces the API that would allow for 1). because react context can be non-null before react instance is ready, i created an async api that will guarantee the runtime executor will be ready.

Differential Revision: D53461821

philIip avatar Feb 06 '24 08:02 philIip

This pull request was exported from Phabricator. Differential Revision: D53461821

facebook-github-bot avatar Feb 06 '24 08:02 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53461821

facebook-github-bot avatar Feb 06 '24 08:02 facebook-github-bot

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 17,233,692 -7
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 20,600,119 -1
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: e37da1e71a039768202ab4888463fb3b3eca8352 Branch: main

analysis-bot avatar Feb 06 '24 08:02 analysis-bot

This pull request was exported from Phabricator. Differential Revision: D53461821

facebook-github-bot avatar Feb 07 '24 23:02 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53461821

facebook-github-bot avatar Feb 07 '24 23:02 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53461821

facebook-github-bot avatar Feb 08 '24 03:02 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53461821

facebook-github-bot avatar Feb 08 '24 03:02 facebook-github-bot

This pull request has been merged in facebook/react-native@d7dce975f91255c6383f9cc6d3b8f818f6e0420b.

facebook-github-bot avatar Feb 09 '24 02:02 facebook-github-bot