facebook / hermes

A JavaScript engine optimized for running React Native.
https://hermesengine.dev/
MIT License
9.41k stars 596 forks source link

[DRAFT] Add Node-API to Hermes #1377

Open vmoroz opened 4 weeks ago

vmoroz commented 4 weeks ago

Summary

This is an initial implementation of Node-API for Hermes. The code is taken from the hermes-windows repo.

Node-API is an ABI-safe that is originally implemented for Node.js addons, and then adopted by all major JS runtimes.

This is a draft PR. Before removing the draft status I would like to ask a few questons:

Test Plan

Unit tests for Node-API are to be added.

tmikov commented 4 weeks ago

Thanks for doing this @vmoroz!!!

facebook-github-bot commented 4 weeks ago

@tmikov has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

shirakaba commented 4 weeks ago

Thanks so much, @vmoroz! Really excited to play with this.

NathanWalker commented 4 weeks ago

Huge effort @vmoroz thank you ❤️