Remove Hermes vendoring once React Native ships a Hermes with Node-API
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- android, cpp, react-native, ruby, typescript
- Lĩnh vực
- build-system, mobile, tooling
Hướng nghiên cứu
Trước tiên, kiểm tra version.properties của React Native và tag Hermes tương ứng cho API/napi/, sau đó xác minh rằng các artifact Android và Apple được phát hành có cung cấp các symbol và header Node-API bắt buộc. Xem xét các tệp CLI, Gradle, C++, podspec, workflow, app, tài liệu và package được liệt kê trước khi xóa các đường dẫn vendoring. Công việc được xem là hoàn tất khi ứng dụng kiểm thử build và vượt qua các bài kiểm thử với React Native nguyên bản, không có REACT_NATIVE_OVERRIDE_HERMES_DIR hoặc cấu hình build-from-source.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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, and the host calls into it directly (hermes_napi_create_env in packages/host/cpp/CxxNodeApiHostModule.cpp, with the hermes_napi_host struct 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 — 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-09-24:
HERMES_VERSION_NAME=260318099.0.2(unchanged since at least 2026-09-14 — ten consecutive checks, 2026-09-14 through 2026-09-24, have all read the same value)API/napi/hermes_napi.h→ still 404 athermes-v260318099.0.2, whileAPI/hermes/hermes.hresolves at the same tag — so the tag is valid and still carries no Node-API. No open PR references this issue. Still nothing to poll for besides re-checking the gate.
That's the cheap signal to poll. Something like:
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_env(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-hermescommand, plus its 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.github/workflows/check.yml:330-333— the vendoring step in the Android jobapps/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— most of it 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 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
- Ngôn ngữ chính
- TypeScript
- Star
- 188
- Fork
- 10
- Merge trung bình
- 2 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstackincubator/react-native-node-api
-
Android 🤖
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projects Đang mởAndroid 🤖 good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
callstackincubator/react-native-node-api#163 · 1 bình luận ·
-
enhancement good first issue gyp-to-cmake
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
callstackincubator/react-native-node-api#161 · 3 bình luận · 1 reaction ·
-
enhancement Host 🏡
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Automatable good first issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 15/100
callstackincubator/react-native-node-api#424 · 1 bình luận ·
Tất cả issue của callstackincubator/react-native-node-api
Issue tương tự
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Crush Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ElementsProject/cln-application#167 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Quantco/pnpm-licenses#17 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100