Prebuilt node-api facade for published addons

Offen
#496 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@kraenhansen arbeitet bereits daran.

Seit 01.11.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

enhancement Host 🏡 Linking 🔗

Let published prebuilds record a neutral node-api library name, provided by a small prebuilt library the host embeds in the app. Addons then never name an engine, and a Hermes rename or a new engine means adding a facade rather than rebuilding addons. Deferred: the RFC in #447 doesn't need this. It depends on the stub generator in #494.

The facade has no code, table or injection step. On Apple it re-exports the Node-API symbols from Hermes, and on Android it's an empty library with a DT_NEEDED on Hermes. Details are in #493, and the spike findings are in this comment: 18 of 18 tests passed on an iOS simulator and an Android emulator, with async recording only node-api and resolving into Hermes.

Steps

  • Run a Release build on a physical iPhone, through signing and App Store validation. This is the main remaining risk and should come first.
  • Add a way for a module to tell link to keep its exact name. The spike hacks getLibraryName.
  • Add a prebuilt facade per backend, built with cmake-rn against a stub of the engine, with a generated re-export list on Apple.
  • Make link choose which facade to embed.

Open questions

  • Can weak-node-api be built under the node-api name as an alternative backend, so one addon binary works with either?
  • Should in-app and from-source addons use the same path, so there's only one to maintain?

node-api becomes a stable ABI contract once prebuilds ship, so settle the name before publishing any.

Vorherrschende Sprache
TypeScript
Sterne
206
Forks
12
Ø Merge
4 Std. 35 Min.
Gemergte PRs (30 T.)
9

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus callstackincubator/react-native-node-api

Alle Issues in callstackincubator/react-native-node-api

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.