microsoft / microsoft/react-native-windows

ABI-safe JavaScript Engine API

Open
#4,552 1 comment 0 reactions 1 assignee View on GitHub

@tudorms is already working on this.

Since May 19, 2020.

Area: Core DLL Area: JavaScript Engine enhancement Workstream: Developer Experience
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Currently RNW could use different JavaScript engines: Hermes, V8, Chakra.
As we go towards the DLL-based deployment we must make decision about the relationship between the Microsoft.ReactNative.dll and JavaScript engines.
Since the JavaScript engines are compiled outside of the Microsoft.ReactNative.dll toolchain we must make sure that the interaction is done in an ABI safe way.
E.g. use of Chakra engine is ABI safe because we always use it through the Chakra's C-style ABI safe API.
For the V8 and Hermes engines we do not have ABI-safe APIs.
It means that use of these engines with Microsoft.ReactNative.dll is not safe and subject to random crashes due to incompatibilities in MSVC CRT libraries.

We must make a decision that we either:

  • Use only Chakra JavaScript engine
  • Add ABI-safe on top of V8 and Hermes engines.
    • For V8 one of the options could be use of NAPI subset (Node.js API).
    • For Hermes we must write an API that supports "tunneling" of the JSI API.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.