Remove Hermes vendoring once React Native ships a Hermes with Node-API
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Refactoring
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- android, cpp, react-native, ruby, typescript
- Bereich
- build-system, mobile, tooling
Rechercherichtung
Prüfe zuerst die version.properties von React Native und den entsprechenden Hermes-Tag für API/napi/, und verifiziere anschließend, dass die ausgelieferten Android- und Apple-Artefakte die erforderlichen Node-API-Symbole und Header bereitstellen. Überprüfe die aufgeführten CLI-, Gradle-, C++-, podspec-, Workflow-, App-, Dokumentations- und Paketdateien, bevor du die Vendoring-Pfade entfernst. Fertig ist die Arbeit, wenn die Test-App mit unverändertem React Native ohne REACT_NATIVE_OVERRIDE_HERMES_DIR oder eine build-from-source-Konfiguration gebaut wird und die Tests besteht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Tracking the removal of vendor-hermes and everything that hangs off it, gated on React Native shipping a Hermes that carries Node-API.
Why we vendor today
After #372 we no longer patch Hermes — we build it from a pinned commit on the static_h branch, which carries the first-party Node-API implementation under API/napi (target hermesNapi). The pin lives in packages/host/src/node/cli/hermes.ts. On Apple platforms it is built once into an archive by the prebuilt-hermes command and injected into pod install through HERMES_ENGINE_TARBALL_PATH; Android (and the opt-in REACT_NATIVE_NODE_API_HERMES_FROM_SOURCE=1 path) builds it from the vendored checkout.
The host calls into it directly (hermes_napi_create_env and hermes_napi_load_module in packages/host/cpp/CxxNodeApiHostModule.cpp, with the hermes_napi_host struct and both declarations mirrored in packages/host/cpp/HermesNapiHost.hpp).
React Native's own Hermes doesn't have that code yet, which is the only reason we need REACT_NATIVE_OVERRIDE_HERMES_DIR on Android — and therefore the only reason consumers have to build React Native from source at all.
The gate
React Native doesn't tag every nightly, so read the head of the default branch rather than a release:
packages/react-native/sdks/hermes-engine/version.propertieson the default branch offacebook/react-native→HERMES_VERSION_NAME.- Check whether
facebook/hermesat taghermes-v$HERMES_VERSION_NAMEhas anAPI/napi/directory.
State as of 2026-10-01 (not met):
HERMES_VERSION_NAME=260318099.0.2(same value on every check since at least 2026-09-14)API/napi/hermes_napi.h→ 404 athermes-v260318099.0.2, whileAPI/hermes/hermes.hresolves at the same tag — so the tag is valid and carries no Node-API.- No open PR addresses this issue. Nothing to do except re-check the gate.
version=$(curl -fsSL https://raw.githubusercontent.com/facebook/react-native/main/packages/react-native/sdks/hermes-engine/version.properties | sed -n 's/^HERMES_VERSION_NAME=//p')
curl -fsSLo /dev/null "https://raw.githubusercontent.com/facebook/hermes/hermes-v$version/API/napi/hermes_napi.h" && echo "Node-API has landed in RN's Hermes ($version)"
Necessary, but not sufficient
The version check tells us the source has Node-API in it; before dropping anything we still need the shipped artifacts to expose it:
- the
hermes-engineAAR'slibhermesvm.somust exporthermes_napi_create_envandhermes_napi_load_module(Hermes has to build thehermesNapitarget and keep it visible under its global-fvisibility=hidden, cf. facebook/hermes#2106 — see the pin comment inhermes.ts), - the same for the Hermes framework shipped through the podspec on Apple platforms,
hermes_napi.h(or an equivalent public header) needs to reach us through prefab / the framework headers, soHermesNapiHost.hppcan include it instead of mirroring the struct,IHermes::getVMRuntimeUnsafe()still has to be reachable from the JSI runtime.
The real acceptance test is the test app building and passing against a stock React Native with no REACT_NATIVE_OVERRIDE_HERMES_DIR set and no build-from-source configuration.
What removal touches
packages/host/src/node/cli/hermes.ts— thevendor-hermesandprebuilt-hermescommands, plus their registration inpackages/host/src/node/cli/program.ts(a breaking CLI change, so it wants a major changeset)packages/host/android/build.gradle:7-17— theREACT_NATIVE_OVERRIDE_HERMES_DIRguard, andpackages/host/src/node/gradle.test.ts, which asserts that errorpackages/host/scripts/patch-hermes.rband itsrequire_relativein the podspec (including theHERMES_ENGINE_TARBALL_PATHinjection).github/workflows/check.yml— the "Clone patched Hermes version" step in the Android job (~L399-403) and the prebuilt Hermes resolve/cache/build steps in the iOS job (~L247-266)apps/test-app/android/gradle.properties—react.buildFromSource=truebecomes unnecessarypackages/host/cpp/HermesNapiHost.hpp— include the realhermes_napi.hinstead of mirroringhermes_napi_host, which also removes the "re-diff on every pin bump" hazarddocs/ANDROID.md,docs/CLI.md— most of the Android build-from-source guidance disappears; Android stops needing a source build (see #411 for its current state)README.md(the supported-versions note),packages/host/README.md,AGENTS.md§ Critical Build Dependenciespackages/host/package.json— thereact-nativepeer dependency can widen from a single nightly (currently0.88.0-nightly-20260809-db662caea) to a real range
Related
- #177 — prebuilt Node-API Hermes, the interim mitigation if this takes a while
- #392 —
react-native-macosblocked on the same story - #188 — the consumer-side Gradle settings helper, which becomes moot along with the source-build requirement
- Vorherrschende Sprache
- TypeScript
- Sterne
- 191
- Forks
- 11
- Ø Merge
- 11 Std. 56 Min.
- Gemergte PRs (30 T.)
- 2
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus callstackincubator/react-native-node-api
-
Android 🤖
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projectsOffenAndroid 🤖 good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
callstackincubator/react-native-node-api#163 · 1 Kommentar ·
-
enhancement good first issue gyp-to-cmake
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
callstackincubator/react-native-node-api#161 · 3 Kommentare · 1 Reaktion ·
-
enhancement Host 🏡
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
-
Two test gaps: unverified prebuild `Info.plist` and a missing `.node` fixture in the Babel plugin testsEvtl. vergeben @wanxiankai hat das vor 53 Tagen übernommen. OffenAutomatable good first issue
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 15/100
callstackincubator/react-native-node-api#424 · 1 Kommentar ·
Alle Issues in callstackincubator/react-native-node-api
Ähnliche Issues
-
area/dashboard kind/bug QA/dev-automation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
rancher/dashboard#19379 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 5 Tagen
-
perf(core): getComments() runs the approved count and the comment list as two sequential queriesOffenarea/core bot:bug bot:working
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
emdash-cms/emdash#3905 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
lingdojo/kana-dojo#31728 · 1 Kommentar · 5 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
selective-claw: freshTailTurns=0 keeps ALL turns verbatim and summarizes none (slice(-0) === slice(0))Evtl. vergeben @zjncs hat das heute übernommen. Offencomponent:tokenless
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
agentic-os-org/ANOLISA#6112 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug needs triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
rjsf-team/react-jsonschema-form#5439 ·
Maintainer antworten meist innerhalb von 1 Tag