microsoft / hermes-windows

Hermes is a small and lightweight JavaScript engine optimized for running React Native apps..
https://hermesengine.dev
MIT License
52 stars 33 forks source link

Add Hermes ABI-safe API #151

Closed vmoroz closed 1 year ago

vmoroz commented 1 year ago

Summary

In this PR we start adding Hermes ABI-safe API.

Details

The following functions are added to ensure proper Hermes runtime instantiation and to enable sampling profiler in ReactNative for Windows. The new API does not cover the whole API surface yet. It even provides a function hermes_get_non_abi_safe_runtime to access non-ABI safe API until we have the full API coverage. The goal is to increase the ABI-safe surface until we can avoid using the non-ABI safe APIs.

The PR also contains fixes to the Node-API implementation which are required for JSI implementation on top of Node-API to pass JSI unit tests.

Microsoft Reviewers: Open in CodeFlow