Skip to content

Sync Hermes static_h@26fbb82f and build hermes.dll at JSI 22 - #408

Merged
Vladimir Morozov (vmoroz) merged 12 commits into
microsoft:mainfrom
vmoroz:PR/hermes-sync-static-h-2026-10-30-26fbb82f
Nov 9, 2026
Merged

Vladimir Morozov (vmoroz) merged 12 commits into
microsoft:mainfrom
vmoroz:PR/hermes-sync-static-h-2026-10-30-26fbb82f

Conversation

@vmoroz

@vmoroz Vladimir Morozov (vmoroz) commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Sync hermes-windows with facebook/hermes static_h at 26fbb82f, and keep the
Windows-specific behavior that React Native Windows and other hermes.dll consumers
depend on.

Upstream import

  • Imports static_h@26fbb82f with the updated fork-sync tool (0.6.0, snapshot mode),
    so later syncs replay cleanly and our deliberate deletions stay deleted.
  • Restores fork behavior that the import would otherwise drop: Windows Intl providers
    (bundled ICU by default, WinGlob, system ICU), the Node-API implementation,
    MicrotaskQueue=false support, and the HermesExport.h shared-library guard.

JSI 22 inside hermes.dll

  • hermes.dll and its in-repo clients build at JSI 22. The public JSI headers still
    default to JSI 21, and new test targets compile a JSI 20 and a JSI 21 consumer, so
    existing apps keep building unchanged.

Host-object finalizers stay inline

  • Upstream now destroys HostObject, HostFunction, and NativeState owners on a new
    background thread. hermes-windows keeps today's behavior: they are destroyed inline
    during finalization unless a host explicitly sets FinalizerThreadRunner. This
    avoids new cross-thread destruction for RNW and other consumers.

hermes.dll export check

  • A new check runs after every .\dev build and in every CI build cell. It fails if
    hermes.dll exports any C++ (mangled) name or misses any required C export, including
    the _sh_* / hoost_* exports that Static Hermes needs. The allowlist is
    hermes-exports.txt; AGENTS.md explains how to update it.

Test reliability

  • Crash/assert dialogs are suppressed in every test host (Node-API tests, hermes_rt,
    hdb, hbc-diff, and Static Hermes programs), so a failing test can't leave a modal
    dialog on a build agent. Note: _sh_init now prints a stack trace on fatal signals,
    which also turns off WER crash reports for Static Hermes-compiled programs.
  • Node-API child-process tests run in a job object, so a timed-out test can't leave
    grandchild processes behind.
  • Test-host copies of hermes.dll now refresh whenever the DLL changes.

Package restore

Windows date offsets with TZ set

  • Upstream's new local-time cache reads the hour from localtime_s. When TZ is
    set, the UCRT keeps the host's DST bias, which is 0 on hosts without DST, so
    TZ=PST8PDT reported UTC-8 in July. The fix applies the one-hour shift in that
    case, restoring the previous behavior; a new test emulates such a host.

Sandbox sources land separately

  • Upstream regenerated the wasm2c sandbox sources (~200 MB in
    API/hermes_sandbox/external/hermes_sandbox_impl_{dbg,opt}_compiled*). GitHub
    cannot diff them in place, which left this PR with no file list, so this PR
    deletes the old ones and a follow-up PR adds the new ones. Until then the sandbox
    and its APITests variant are skipped. Nothing shipped uses the sandbox.

Test Plan

  • .\dev build --test --jstest --test262-intl on x64, x86, ARM64 and ARM64EC (native
    ARM64 machine for the ARM ones), debug and release: all native suites pass, JS
    regression tests have no unexpected failures, Test262 intl402 passes 348/348, and
    the export check passes for every DLL. UWP builds and BinSkim pass.
  • A NuGet package built from this branch has the expected layout. RNW's
    playground-composition ARM64 app (Debug and Release) built against it, loaded its
    hermes.dll, rendered RNTester, reloaded, and closed/reopened cleanly. Two other RNW
    samples fail the same way with RNW's current Hermes package, so that is an RNW
    issue unrelated to this change.

Copilot AI balanced review requested due to automatic review settings November 7, 2026 04:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to run its full agentic suite in this review.

Copilot review overview

No open issues 🎉

What changed in this PR

Syncs hermes-windows with upstream Hermes (static_h@26fbb82f) while preserving Windows-specific behaviors, and updates tooling/build/test infrastructure to support JSI 22 usage inside hermes.dll plus new reliability/export gates.

Changes:

  • Updates sandbox + C ABI plumbing for new/changed JSI methods and ABI entries (e.g., array length, isArray, typed arrays, error creation), and improves sandbox regeneration documentation/tooling.
  • Adds Worker extension (guarded by JSI_UNSTABLE) and strengthens extension buffer safety by rooting ArrayBuffers in typed-array views.
  • Adds a hermes.dll export allowlist checker (unit-tested) and wires it into local builds + CI; extends CDP to retain evaluated sources and adds stubs for missing Debugger methods.
File Description
API/​hermes_sandbox/​external/​hermes_sandbox_impl_dbg_compiled.h Updates generated export list for sandbox debug artifact
API/​hermes_sandbox/​README.md Documents JSI support and sandbox regeneration steps/constraints
API/​hermes_sandbox/​HermesSandboxRuntime.cpp Implements/overrides more JSI methods safely for untrusted sandbox JS
API/​hermes_sandbox/​CMakeLists.txt Tightens wasm link flags & sanitizer handling for generated C
API/​hermes_node_api_jsi/​NodeApiJsiRuntime.cpp Aligns Node-API JSI behavior with JSI 22 semantics (arrays/proxies)
API/​hermes_node_api/​hermes_node_api.cpp Updates VM object creation to use hidden classes as needed
API/​hermes_abi/​hermes_vtable.cpp Adjusts ABI behaviors for proxies/arrays, error propagation, and array length
API/​hermes_abi/​hermes_abi.h Updates vtable signatures (e.g., get_array_length, object_is_array)
API/​hermes_abi/​HermesABIRuntimeWrapper.cpp Adapts wrapper to new ABI result types and overload visibility
API/​hermes_abi/​CMakeLists.txt Links hermesabi against full VM archive (hermesvm_a)
API/​hermes/​extensions/​contrib/​TextDecoder.cpp Fixes buffer lifetime by rooting backing ArrayBuffer during decode
API/​hermes/​extensions/​Worker.h Adds public header for Worker extension install hook
API/​hermes/​extensions/​Worker.cpp Adds Worker implementation using threads, message queues, serialization
API/​hermes/​extensions/​TextEncoder.cpp Updates typed-array buffer access to new TypedArrayBufferInfo API
API/​hermes/​extensions/​JSIUtils.h Makes typed-array buffer view GC-safe by keeping ArrayBuffer alive
API/​hermes/​extensions/​JSIUtils.cpp Validates byte ranges and returns rooted buffer view
API/​hermes/​extensions/​Intrinsics.h Captures DataView getters for robust brand-checking
API/​hermes/​extensions/​Intrinsics.cpp Implements intrinsic capture & DataView brand-check helpers
API/​hermes/​extensions/​Extensions.cpp Installs Worker extension under JSI_UNSTABLE
API/​hermes/​extensions/​CMakeLists.txt Adds Worker.cpp to extensions build
API/​hermes/​extensions/​11-Worker.js Adds JS setup script that installs globalThis.Worker
API/​hermes/​cdp/​tools/​message_types.txt Adds Debugger message types for new methods
API/​hermes/​cdp/​RuntimeDomainAgent.h Adds retention hook for evaluated script sources
API/​hermes/​cdp/​RuntimeDomainAgent.cpp Retains evaluated sources so Debugger can serve them back
API/​hermes/​cdp/​RemoteObjectConverters.cpp Matches V8 behavior by avoiding duplicate exception text
API/​hermes/​cdp/​MessageTypes.h Adds new CDP request/response types (script source, breakpoints)
API/​hermes/​cdp/​MessageTypes.cpp Implements JSON conversion + dispatch for new CDP message types
API/​hermes/​cdp/​EvaluatedScriptSources.h New bounded cache for sources of Runtime.evaluate-created scripts
API/​hermes/​cdp/​EvaluatedScriptSources.cpp Implements retention, assignment, and eviction for evaluated sources
API/​hermes/​cdp/​DebuggerDomainCoordinator.h Threads evaluated-source cache through debugger coordinator
API/​hermes/​cdp/​DebuggerDomainCoordinator.cpp Assigns evaluated sources on script-load events
API/​hermes/​cdp/​DebuggerDomainAgent.h Adds Debugger.getScriptSource and getPossibleBreakpoints APIs
API/​hermes/​cdp/​DebuggerDomainAgent.cpp Implements getScriptSource + stub getPossibleBreakpoints
API/​hermes/​cdp/​CDPDebugAPI.h Stores evaluated-source cache within CDPDebugAPI
API/​hermes/​cdp/​CDPDebugAPI.cpp Passes evaluated-source cache into debugger coordinator
API/​hermes/​cdp/​CDPAgent.cpp Wires new CDP APIs into command handling and agent construction
API/​hermes/​TracingRuntime.h Adds tracing overrides for new JSI methods and JSON parsing
API/​hermes/​TracingRuntime.cpp Implements traceable Math wrappers and new trace records
API/​hermes/​TraceInterpreter.cpp Replays new trace records and installs traceable math wrappers
API/​hermes/​SynthTraceParser.cpp Parses new trace record types (UInt8Array, errors, array push)
API/​hermes/​SynthTrace.h Adds new SynthTrace record types and error-type enum
API/​hermes/​SynthTrace.cpp Serializes new SynthTrace record types to JSON
API/​hermes/​CompileJS.h Adds compile flags for ES6 block scoping and async generators
API/​hermes/​CompileJS.cpp Wires new compile options into compiler flags
API/​hermes/​CMakeLists.txt Adds evaluated-source implementation to build; restores Android JNI deps
API/​CMakeLists.txt Adds conditional N-API subdirectory based on HERMES_ENABLE_NAPI
AGENTS.md Documents export gate + Windows fork behaviors to preserve
.syncignore Fixes Node API unittest path casing
.github/​dependabot.yml Adds Dependabot updates for external/node-api-cts
.claude/​skills/​regenerate-sandbox/​verify_generated.py Adds sandbox output verifier for imports/exports/ABI/paths/ids
.claude/​skills/​regenerate-sandbox/​references/​troubleshooting.md Adds sandbox regeneration troubleshooting reference
.claude/​skills/​regenerate-sandbox/​references/​testing.md Adds sandbox testing reference
.claude/​skills/​regenerate-sandbox/​references/​jsi.md Adds sandbox JSI guidance/reference
.claude/​skills/​regenerate-sandbox/​references/​checks.md Adds sandbox output checking + stack budget reference
.claude/​skills/​regenerate-sandbox/​references/​building.md Adds sandbox build tool/version guidance
.claude/​skills/​regenerate-sandbox/​references/​abi.md Adds ABI/mirror change rules for sandbox
.claude/​skills/​regenerate-sandbox/​SKILL.md Adds skill doc to guide regenerations consistently
.claude/​skills/​modify-jsi-features/​SKILL.md Adds/records guidance for adding new JSI functionality
.claude/​skills/​gc-safe-coding/​SKILL.md Expands GC safety guidance (incl. SymbolID pitfalls)
.claude/​agents/​code-reviewer.md Updates tool list reference
.ado/​scripts/​package.json Adds test:exports script
.ado/​scripts/​hermes-exports.txt Adds reviewed C-export allowlist for hermes.dll
.ado/​scripts/​check-exports.ts Implements hermes.dll export allowlist + C++/DATA/forwarder rejection
.ado/​scripts/​check-exports.test.ts Adds unit tests for export checker
.ado/​scripts/​build.js Runs export checks after build/copy and in staged outputs; sets PYTHONIOENCODING
.ado/​scripts/​README.md Documents export checker and how to run tests
.ado/​build-template.yml Runs export checker tests and updates step name to include export gate

Review effort: Lite

Copilot AI balanced review requested due to automatic review settings November 7, 2026 05:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to run its full agentic suite in this review.

Copilot review overview

No open issues 🎉

Review effort: Lite

- Pin @rnx-kit/fork-sync to exact 0.6.0 (0.6.1 is not on the approved feed).
- sync.ts: pass the repository root to fork-sync via -C.
- sync-config.json: use snapshot fetch mode and keep local deletions.
- dev.ps1: require Node 24+ before restoring fork-sync and .ado/scripts,
  and restore them with lock-aware npm ci --ignore-scripts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vmoroz
Vladimir Morozov (vmoroz) force-pushed the PR/hermes-sync-static-h-2026-10-30-26fbb82f branch from 1aa3f58 to a67ab34 Compare November 7, 2026 07:46
Copilot AI balanced review requested due to automatic review settings November 7, 2026 07:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to run its full agentic suite in this review.

Copilot review overview

No open issues 🎉

Review effort: Lite

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Benchmark Results

Total benchmarks: 204

Inputs: baseline/baseline.json, bench_result.json

v8 (6176ms, 5522ms) -10.6%
v8 hermes (CI) hermes (CI)
v8-crypto 622.6ms 664.6ms
v8-deltablue 739.4ms 762.4ms
v8-raytrace 127.8ms 124.2ms
v8-regexp 593ms 390.6ms
v8-richards 937ms 880.4ms
v8-splay 225.2ms 235.4ms
v8-crypto (static) 452ms 431.8ms
v8-deltablue (static) 661.6ms 650.2ms
v8-raytrace (static) 91.8ms 99.6ms
v8-regexp (static) 749.2ms 380.8ms
v8-richards (static) 781.4ms 708ms
v8-splay (static) 195ms 194ms
test-suites (317886ms, 305573ms) -3.9%
test-suites hermes (CI) hermes (CI)
box2d 2949.8ms 2772.4ms
earley-boyer 2564.8ms 2564.6ms
navier-stokes 5743.8ms 4395ms
pdfjs 1038.2ms 922.8ms
gbemu 2296ms 2307.8ms
code-load 4472.8ms 4780.4ms
typescript 3381.8ms 3395.6ms
simpleSum 8855.4ms 5683.2ms
propAccess 2691.2ms 2125.4ms
allocObj 252ms 192ms
allocObjLit 6371.8ms 5809ms
allocNewObj 20053ms 20704.6ms
allocArray 249ms 193ms
allocNewArray 34956.8ms 34633.8ms
arrayRead 115.6ms 96.4ms
arrayReadByIndex 550ms 630ms
largeArrayRead 827.2ms 547.8ms
arrayWrite 261.8ms 247.4ms
largeArrayWrite 2218ms 2069ms
interp-dispatch 2880ms 1938.4ms
wb-perf 8327ms 9402.8ms
arrayReverse 40.6ms 36.6ms
arrayMap 1472.6ms 1500ms
arrayIndexOf 143.2ms 131.8ms
arrayLastIndexOf 148.6ms 148.8ms
arrayEvery 2308.8ms 2264.8ms
arraySome 2174.4ms 2261.6ms
arrayFill 2401.2ms 2463.6ms
arrayFilter 1866.4ms 1858.8ms
arrayFind 3207ms 3307.4ms
arrayFindIndex 3322ms 3322.6ms
arrayPop 1031.4ms 1044ms
arrayReduce 1994.2ms 2094.4ms
arrayReduceRight 2075.8ms 2117.6ms
arrayShift 2065.8ms 2093.8ms
arrayUnshift 2109.4ms 2134.6ms
arrayIncludes 1216.6ms 139.2ms
arrayFrom 1102.8ms 1126.2ms
arrayCopyWithin 1487ms 1538.2ms
stringFromCharCode 92.6ms 92.2ms
arraySlice 786.2ms 830.4ms
arraySplice 26.8ms 26.4ms
arrayOf 1048.8ms 1061.6ms
stringCharAt 1346.6ms 1288.6ms
stringMatch 3192.4ms 3150ms
stringSearch 3508.2ms 3068.4ms
stringStartsWith 701ms 573.8ms
stringEndsWith 650.4ms 543.4ms
stringIncludes 1520.6ms 1719.8ms
stringIndexOf 1555.6ms 1975.8ms
stringLastIndexOf 1821.4ms 1742ms
stringSplit 822ms 735ms
stringSlice 490ms 440.8ms
stringPadStart 2910.8ms 3305ms
stringPadEnd 2910ms 3306.4ms
regExpMatch 1506.2ms 635ms
regExpSearch 1227ms 1065.4ms
regExpToString 1204ms 1265ms
stringReplace 1394.8ms 1505.4ms
regExpReplace 3309.2ms 403.2ms
regExpFlags 956.8ms 997ms
regExpSplit 1307.8ms 749.2ms
numberArrayReadWrite 2477.8ms 2381.8ms
protoCache 3594.6ms 2452ms
box2d (static) 1792.6ms 1800ms
earley-boyer (static) 1875.6ms 1942.8ms
navier-stokes (static) 3410.2ms 3372ms
pdfjs (static) 812.8ms 779.8ms
gbemu (static) 1797ms 1767.6ms
code-load (static) 4199.2ms 4277.4ms
typescript (static) 2685.6ms 2597.4ms
simpleSum (static) 936.2ms 942.4ms
propAccess (static) 2298ms 2257.6ms
allocObj (static) 0.2ms 0.2ms
allocObjLit (static) 4154.4ms 3772.8ms
allocNewObj (static) 15749.2ms 17287.6ms
allocArray (static) 0.6ms 0.8ms
allocNewArray (static) 28494.2ms 28935.2ms
arrayRead (static) 74.2ms 68.8ms
arrayReadByIndex (static) 453.2ms 450.4ms
largeArrayRead (static) 552.2ms 528.4ms
arrayWrite (static) 178.4ms 161.4ms
largeArrayWrite (static) 1568.6ms 1462.2ms
interp-dispatch (static) 1918.8ms 1911.4ms
wb-perf (static) 8991.2ms 9058.8ms
arrayReverse (static) 37ms 36.4ms
arrayMap (static) 1064.8ms 994.6ms
arrayIndexOf (static) 128.2ms 120.6ms
arrayLastIndexOf (static) 138.8ms 121ms
arrayEvery (static) 1397.6ms 1422.2ms
arraySome (static) 1406.6ms 1420ms
arrayFill (static) 1969.2ms 2015ms
arrayFilter (static) 1061ms 1068.4ms
arrayFind (static) 2242.2ms 2313.8ms
arrayFindIndex (static) 2235.8ms 2292ms
arrayPop (static) 878ms 908.6ms
arrayReduce (static) 1311.8ms 1332.2ms
arrayReduceRight (static) 1322.6ms 1343.6ms
arrayShift (static) 1512ms 1749ms
arrayUnshift (static) 1568.2ms 1608.2ms
arrayIncludes (static) 963.4ms 129.8ms
arrayFrom (static) 1030.6ms 1002.6ms
arrayCopyWithin (static) 1109.6ms 1127.4ms
stringFromCharCode (static) 77ms 77ms
arraySlice (static) 571.6ms 587.4ms
arraySplice (static) 26ms 27ms
arrayOf (static) 868.8ms 872ms
stringCharAt (static) 1100.6ms 1125.4ms
stringMatch (static) 2227.6ms 2525.4ms
stringSearch (static) 2219.2ms 2480.6ms
stringStartsWith (static) 494.2ms 458.4ms
stringEndsWith (static) 457.8ms 466.8ms
stringIncludes (static) 1437.4ms 1179ms
stringIndexOf (static) 1440.8ms 1451ms
stringLastIndexOf (static) 1956.6ms 1453.4ms
stringSplit (static) 651.2ms 687.6ms
stringSlice (static) 445.6ms 375ms
stringPadStart (static) 2294.4ms 2787.4ms
stringPadEnd (static) 2499.2ms 2820.4ms
regExpMatch (static) 1483.2ms 700.6ms
regExpSearch (static) 1296.2ms 1059.8ms
regExpToString (static) 1326.6ms 1267.4ms
stringReplace (static) 1455.6ms 1076ms
regExpReplace (static) 851.8ms 334.8ms
regExpFlags (static) 870.6ms 856.2ms
regExpSplit (static) 1200ms 641.2ms
numberArrayReadWrite (static) 2132.8ms 1964ms
protoCache (static) 3595.8ms 3609.6ms
micros (60876ms, 60840ms) -0.1%
micros hermes (CI) hermes (CI)
getNodeById.js 5273ms 4749.2ms
setInsert.js 2864.8ms 3053ms
stringify-number.js 1823.4ms 1518.6ms
typed-array-sort.js 22381ms 22584.8ms
getNodeById.js (static) 3941ms 3931.4ms
setInsert.js (static) 2517.6ms 2698.4ms
stringify-number.js (static) 1663.6ms 1352.8ms
typed-array-sort.js (static) 20411.4ms 20952.2ms
jit-benches (8563ms, 6314ms) -26.3%
jit-benches hermes (CI) hermes (CI)
idisp.js 2810.2ms 1933.8ms
idispn.js 3395.8ms 2018ms
idisp.js (static) 1906ms 1902.6ms
idispn.js (static) 450.8ms 459.6ms
many-subclasses (73437ms, 81676ms) +11.2%
many-subclasses hermes (CI) hermes (CI)
many.js 19104.8ms 18915.8ms
many-sh-1.js 7322.8ms 10304.4ms
many-sh-2.js 7329ms 10586ms
many-sh-3.js 7083.6ms 8040ms
many-sh-4.js 7235ms 8034ms
many.js (static) 15996ms 16083.8ms
many-sh-1.js (static) 2285.2ms 2421.2ms
many-sh-2.js (static) 2387ms 2450.8ms
many-sh-3.js (static) 2347.2ms 2416.8ms
many-sh-4.js (static) 2346ms 2423ms
map-objects (3627ms, 1955ms) -46.1%
map-objects hermes (CI) hermes (CI)
map-objects-untyped.js 1023.6ms 1004.2ms
map-objects-typed.js 957.6ms -
map-objects-untyped.js (static) 917.2ms 951ms
map-objects-typed.js (static) 728.8ms -
map-strings (4335ms, 2312ms) -46.7%
map-strings hermes (CI) hermes (CI)
map-strings-untyped.js 1196.8ms 1173.4ms
map-strings-typed.js 1139.2ms -
map-strings-untyped.js (static) 1092.2ms 1139ms
map-strings-typed.js (static) 906.8ms -
nbody (3448ms, 2827ms) -18.0%
nbody hermes (CI) hermes (CI)
original/nbody.js 839.6ms 643.6ms
fully-typed/nbody.js 710ms 546.2ms
fully-typed/nbody.ts 865.2ms 633.8ms
original/nbody.js (static) 449.2ms 453.8ms
fully-typed/nbody.js (static) 135ms 95.8ms
fully-typed/nbody.ts (static) 449.2ms 453.6ms
string-switch (6503ms, 6625ms) +1.9%
string-switch (string-switch/plain) hermes (CI) hermes (CI)
bench.js 1316ms 1285.8ms
bench.js (static) 5187ms 5339.2ms
raytracer (5608ms, 5590ms) -0.3%
raytracer (raytracer/original) hermes (CI) hermes (CI)
bench-raytracer.js 1550.4ms 1524.6ms
raytracer.ts 1667.6ms 1542.2ms
bench-raytracer.js (static) 1198.4ms 1279.4ms
raytracer.ts (static) 1191.8ms 1243.8ms
MiniReact (30332ms, 21769ms) -28.2%
MiniReact hermes (CI) hermes (CI)
no-objects/out/simple-stripped.js 2239.2ms 854.6ms
no-objects/out/simple-lowered.js 2270.8ms 892ms
no-objects/out/music-stripped.js 42.6ms 42.2ms
no-objects/out/music-lowered.js 47.2ms 47.2ms
no-deps/stripped/MiniReact.js 5004ms 4550.2ms
no-deps/MiniReact.js 5256.2ms 4475.2ms
no-objects/out/simple.js 2260.4ms 822.4ms
no-objects/out/music.js 45.6ms 44.2ms
no-objects/out/simple-stripped.js (static) 1725.2ms 693ms
no-objects/out/simple-lowered.js (static) 1725.4ms 672ms
no-objects/out/music-stripped.js (static) 18.8ms 27.6ms
no-objects/out/music-lowered.js (static) 19.4ms 26.6ms
no-deps/stripped/MiniReact.js (static) 4024.8ms 4001.8ms
no-deps/MiniReact.js (static) 3938.2ms 3922.2ms
no-objects/out/simple.js (static) 1695.2ms 669.8ms
no-objects/out/music.js (static) 19ms 27.6ms
widgets (12934ms, 12748ms) -1.4%
widgets hermes (CI) hermes (CI)
simple-classes/widgets.js 1758.2ms 2268ms
original/es5/widgets.js 2798.8ms 2542.6ms
single-file/es5/widgets.js 2775.2ms 2553ms
simple-classes/widgets.js (static) 1012ms 1138ms
original/es5/widgets.js (static) 2283.2ms 2122ms
single-file/es5/widgets.js (static) 2306.2ms 2124.6ms

@vmoroz

Copy link
Copy Markdown
Member Author

/azp run

Import facebook/hermes static_h at 26fbb82 with fork-sync 0.6.0 (snapshot mode, local deletions kept) and integrate it with the Windows fork:
- hermes.dll producers and internal JSI clients build at JSI 22; public JSI headers still fall back to 21; JSI_UNSTABLE stays ON.
- Keep fork Node-API, WinGlob Unicode and Intl providers; upstream NAPI stays off on Windows; remove the deleted upstream ICU backend.
- Keep MicrotaskQueue=false support (RNW bridge mode) over upstream d800198, with tests for both queue modes.
- Keep the HermesExport.h CREATE_SHARED_LIBRARY guard; hermes.dll exports C names only.
- Suppress CRT/WER dialogs in Node-API test mains and Static Hermes programs; bound Node-API child-process tests with a timeout.
- Fix shermes CRT flag selection for clang; add Proxy array JSI test.

npm/Yarn lock reconciliation for imported packages follows in a separate commit.

The regenerated wasm2c sandbox sources (API/hermes_sandbox/external/hermes_sandbox_impl_{dbg,opt}_compiled*) are left out and land in a follow-up pull request, because GitHub cannot diff them in place. Until then the sandbox and its APITests variant are skipped.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Make external/node-api-cts/.npmrc registry-free like the other committed
.npmrc files, add its package-lock.json (no resolved URLs), and update the
hermes-parser and flow-bundler yarn.lock files lock-only for the imported
manifest changes. Locks were resolved anonymously through PackageFeedProxy.
No auth, security resolutions kept, no downgrades.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- README: add the grouped JSI 22 row with static_h hashes, keep main hashes, note 606a424 (main) and b10cafd (static_h) are the same JSI 21, and map React Native 0.80=19, 0.81=20, 0.82-0.85=21, 0.86+/main=22. hermes.dll builds at 22; public headers fall back to 21; RNW uses 21 over the C API.
- Add default-built, unlinked compile-only objects that compile the public JSI headers, jsi.cpp and decorators at JSI 20 and at the header fallback (21).
- Fix stale jsi.h comments about the default version and header name.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Check every built hermes.dll copy with dumpbin /nologo /exports from build.js
so `dev build` and the ADO build step share one gate. Fail on tool errors,
empty or unparseable output, C++ (MSVC/Itanium) names, DATA, ordinal-only and
forwarded exports, missing required names, and unknown C names (add them to
hermes-exports.txt). hoost_* exports are optional only on ARM64EC.

Add unit tests and run them in the ADO pipeline next to the npm source lint
tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Upstream static_h moved destruction of JSI HostObject, HostFunction and
NativeState owners to an always-on finalizer worker thread. hermes-windows
keeps today's behavior: when RuntimeConfig::FinalizerThreadRunner is unset
(the jsr/hermes.dll path), owners are destroyed inline in their VM finalizer
and no worker thread is created. An explicitly supplied runner keeps the
upstream worker. Tests cover every owner kind in both modes.

NodeApi child-process tests now run each child in a job object
(KILL_ON_JOB_CLOSE) so a timeout also ends grandchildren, and the test-host
copies of hermes.dll are refreshed whenever the DLL changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tion

- APITests: query the Hades background thread only in debug builds, so
  release builds with handle sanitization compile; that configuration
  checks exactly-once finalization.
- JSI tests: use the checked asArray conversion for the revoked Proxy case,
  because getArray validates only in debug builds.
- NodeApi tests: match the exact abort status and output of the debug and
  release CRT, and treat a reused protected PID as gone.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Suppress CRT/WER crash dialogs in hermes_rt, hdb, and hbc-diff, which
  run lit and test262 Intl tests.
- Merge adjacent JSI_VERSION >= 22 guards in decorator.h, jsi.h, and
  jsi-inl.h; preprocessed output is unchanged at JSI 20, 21, and 22.
- Drop the custom-runner cases from OwnerFinalizationTest; the
  FinalizerThreadRunner test keeps that coverage.
- Set up the VS environment once per build for the export check.
- Restore executable bits on three imported scripts, fix the NodeApi
  spelling in .syncignore, and document the export check and the fork
  behaviors to keep on every sync in AGENTS.md.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The imported bootstrap loop in tools/hermes-parser/js/scripts/build.sh called
bare `yarn`, bypassing the repository's pinned Yarn 4 that microsoft#378 routed every
other call in this script through. Use run_yarn there as well.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vmoroz
Vladimir Morozov (vmoroz) force-pushed the PR/hermes-sync-static-h-2026-10-30-26fbb82f branch from a67ab34 to ee808ec Compare November 7, 2026 17:57
Copilot AI balanced review requested due to automatic review settings November 7, 2026 17:57
@vmoroz

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

With HERMES_ENABLE_NAPI enabled, hvm lacks the whole-archive and dynamic-export linking needed for native addons, causing even basic addons to fail on Linux with undefined NAPI symbols.

1 open issue

Review effort: Balanced

Comment thread tools/hvm/CMakeLists.txt Resolved
When TZ is set, the UCRT's tzset() updates _timezone and _daylight but keeps
the DST bias of the host's timezone, which is 0 on hosts without DST such as
UTC build agents. localtime_s() then flags DST without shifting the fields,
so the new DateCache reported standard time during DST (for example UTC-8
instead of UTC-7 for TZ=PST8PDT in July) and DateUtilTest failed in CI.
Apply the one-hour shift in that case, and add a test that emulates such a
host.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Existing build trees configured with the generated sandbox sources failed to
build after the sources were deleted, because CMake watched the folder only
while the sources were missing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 16:49
@vmoroz

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Changes to VM layouts, bytecode compatibility, and cross-architecture native linkage require platform-owner review and native execution results that cannot be independently validated in this source-only environment.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@vmoroz
Vladimir Morozov (vmoroz) merged commit 798461b into microsoft:main Nov 9, 2026
19 checks passed
Vladimir Morozov (vmoroz) added a commit that referenced this pull request Nov 10, 2026
hermes-windows does not ship the sandbox. Its generated wasm2c sources
(API/hermes_sandbox/external/hermes_sandbox_impl_{dbg,opt}_compiled*) are
~200 MB per upstream regeneration, and GitHub cannot diff them in place.
#408 removed them; list them in .syncignore so future syncs keep them out,
including new file names. The sandbox stays skipped while they are absent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants