Repository navigation
Monorepo step 3: vendor JsRuntimeHost and UrlLib with full file history - #1947
CedricGuillemet wants to merge 218 commits into
Conversation
Simplify polyfill Window to just Scheduling
[skip ci]
- Add minimal iOS app to run unit tests - Update all printf code to be more consistent - Build clean and updates to accommodate iOS - Disable setTimeout test that is intermittently failing on Android CI (#9)
## Context `build-linux.yml` set job-level `CC`/`CXX` env alongside the `-D CMAKE_C_COMPILER` / `-D CMAKE_CXX_COMPILER` configure flags. The `-D` flags already select the compiler for both the gcc and clang matrix legs, so the env block was redundant. No behavior change: on the parallel UrlLib CI cleanup both the gcc and clang Linux jobs stayed green with the env removed. The Run Tests step's `env` (`TSAN_OPTIONS` / `JSC_useConcurrentGC`) is untouched. Part of a small cross-repo consistency pass — UrlLib landed the same cleanup. BabylonNative was checked and intentionally left alone: its `build-linux.yml` env is load-bearing there (its configure passes no `-D` compiler flags). [Created by Copilot on behalf of @bghgary] Co-authored-by: Gary Hsu <223556219+Copilot@users.noreply.github.com>
[Created by Copilot on behalf of @bghgary] Native and JavaScript runtime tests for unrelated features were grouped together, making coverage hard to navigate. This change groups the existing tests by feature and packages the generated test bundle and fixtures together under `Assets`. The same tests continue to run through the existing runner. --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…abylonJS#218) [Updated by Copilot on behalf of @bghgary] Fixes BabylonJS#216. ## Context `napi_get_property_names` should return enumerable string-keyed properties across the prototype chain, matching `for...in`. Before this PR, JavaScriptCore threw, Chakra and QuickJS returned only own properties, and JSI had an unimplemented stub. The three Node-API backends now share a property-name walk; JSI uses its own implementation. The walk must account for non-enumerable own properties hiding inherited names, terminate when a Proxy returns a repeated prototype, and keep the returned status consistent with `napi_get_last_error_info`. JavaScriptCore’s `napi_get_prototype` also needed correction for primitives and the null end of a prototype chain. ## Review follow-up A retained JavaScriptCore context could collect reference sentinels after their environment was deleted, causing a use-after-free. This branch addresses that lifetime defect as well as the conformance changes. ## Coverage and limits The feature-named unit tests cover own and inherited names, shadowing, symbols, arrays, prototype termination, error reporting, and reference lifetime. Proxy-dependent cases are skipped on JavaScriptCore because its prototype lookup does not invoke the Proxy trap. Hermes’ `for...in` shadowing discrepancy remains tracked in [BabylonJS#219](BabylonJS/JsRuntimeHost#219); `napi_get_all_property_names` remains V8-only. --------- Co-authored-by: Branimir Karadzic <branimirkaradzic@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Branimir Karadzic <branimirkaradzic@Bgmail.com> Co-authored-by: Gary Hsu <bghgary@users.noreply.github.com> Copilot-Session: 60c2ec68-6de1-445d-9fc9-b699db737eae Copilot-Session: 79ad319b-72f9-4b93-9c81-57858177c0a7 Copilot-Session: af4ea82e-5fb0-4e56-b71a-f8ff3932d033 Copilot-Session: 54aaa1e1-b4b3-46e7-9de4-5a56add4ac42 Copilot-Session: d35d0a8b-b073-4f2a-bbd3-a0b1d3584305 Copilot-Session: fc6f260a-f58d-49ed-9bed-d69248708138
…rs (BabylonJS#261) [Created by Copilot on behalf of @bghgary] ## Context The AbortController polyfill option’s spelling is inconsistent with the other polyfill options. ## Compatibility Use `JSRUNTIMEHOST_POLYFILL_ABORTCONTROLLER` going forward. The old spelling remains supported so existing consumers continue to select the same target; if both names are set, the old value takes precedence. --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
## Fix Call `Runtime::clearKeptObjects()` after draining Hermes microtasks, matching Hermes's own JSI and ABI embeddings. Without this, targets protected by `WeakRef` remain rooted across JavaScript turns, even after full GC. This was identified while investigating retained disposed scenes and heap exhaustion in BabylonJS#1913. It does not increase the heap limit. ## Regression The new Hermes-only native test creates 256 one-MiB weak targets across job drains. The original embedding retains **268,437,568 external bytes** and fails the **64 MiB** bound; the fixed embedding passes. The regression is selected by CMake only for Hermes, alongside the existing engine-specific Node-API sources. Shared tests remain unchanged; other engines do not compile a reference to the Hermes-only `DrainJobs` API. Windows Hermes native Node-API/runtime/scheduling coverage: **10 passed, one existing engine-specific skip**. BabylonNative production validation with this runtime fix passes **123/123 native tests** and **371/371 rendering scenes**, with snapshots enabled, memory instrumentation disabled, stock Babylon.js 9.29.0, and the unchanged **512 MiB** heap limit. Follow-up CI is still required. ## CI follow-up Non-Hermes compilation is repaired by selecting the regression at build time, not with a runtime skip. JSI builds and passes its applicable runtime tests. The next run exposed an existing x86 Chakra scheduling assertion using `Date` (29 ms observed against a 30 ms bound). Timer tests now use the high-resolution `performance.now()` clock, with **unchanged minimum-delay assertions** and no scheduling implementation changes. The complete x86 Chakra suite passes **26/26**, including **251 JavaScript cases**, in each of **three consecutive iterations**. Fresh CI remains required. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 60c2ec68-6de1-445d-9fc9-b699db737eae
*[Created by Copilot on behalf of @bghgary]* Native errors on the JavaScript Interface (JSI) backend reach scripts as generic errors instead of retaining their original class, message, and value. Pending exceptions from reentrant callbacks can also escape the call site. Supersedes [BabylonJS#252](BabylonJS/JsRuntimeHost#252), originally authored by @matthargett. Both original commits retain Matt Hargett's authorship; the tests have been relocated to match current `main`. This replacement is needed because maintainers cannot update the original branch in its organization-owned fork. --------- Co-authored-by: Matt Hargett <plaztiksyke@gmail.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 27231fa6-6686-460a-86dc-642f10ba32b5
[Created by Copilot on behalf of @bghgary] ## Context Hosts that package JavaScript as resources need to load deferred bundles without enabling unrestricted file or network access. Resource delivery may be immediate or asynchronous. ## Compatibility The runtime API evaluates classic scripts and is independent of the bundler; it does not add native ECMAScript module loading. Source-level `import()` must be transformed by the bundler. See `Plugins/DynamicScriptLoader/README.md` for host integration and a Webpack 5 configuration example. Browser builds keep their normal chunk transport. The Webpack example is for packaged JavaScript chunks, not a development server or hot module replacement. --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e36eed22-9b7f-4098-b915-8a84e714ebf7
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e36eed22-9b7f-4098-b915-8a84e714ebf7
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e36eed22-9b7f-4098-b915-8a84e714ebf7
Bring in upstream nightly V8 setting without changing the imported histories. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e36eed22-9b7f-4098-b915-8a84e714ebf7
Keep original files in the imported histories while omitting embedded CI and issue templates from the BabylonNative tree. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e36eed22-9b7f-4098-b915-8a84e714ebf7
Trigger a separate Windows test build only for the four vendored dependency trees or workflow changes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e36eed22-9b7f-4098-b915-8a84e714ebf7
Replace the path-filtered test workflow with a separate standalone CMake test build in the existing default x64/D3D11 CI job. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e36eed22-9b7f-4098-b915-8a84e714ebf7
Match BabylonNative app test platform gating, retain standalone test target naming and execute the embedded suite beside BabylonNative tests on Windows, macOS and Linux. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e36eed22-9b7f-4098-b915-8a84e714ebf7
There was a problem hiding this comment.
🟡 Changes recommended
One or more issues must be addressed before approval.
2 open findings
What changed in this PR
Vendors the pinned JsRuntimeHost and UrlLib dependencies for the monorepo migration. Landing must preserve history; do not squash.
Changes:
- Adds dependency sources, tests, licenses, and provenance documentation.
- Routes FetchContent to tracked sources.
- Enables embedded desktop runtime tests and runs them in existing CI jobs.
| File | Description |
|---|---|
| Documentation/BuildSystem.md | Updated as part of this pull request. |
| Dependencies/UrlLib/UPSTREAM.md | Updated as part of this pull request. |
| Dependencies/UrlLib/Tests/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/UrlLib/Source/WebSocket_Unix.cpp | Updated as part of this pull request. |
| Dependencies/UrlLib/Source/WebSocket_Shared.h | Updated as part of this pull request. |
| Dependencies/UrlLib/Source/WebSocket_Base.h | Updated as part of this pull request. |
| Dependencies/UrlLib/Source/WebSocket_Apple.mm | Updated as part of this pull request. |
| Dependencies/UrlLib/Source/WebSocket_Apple_ObjC.h | Updated as part of this pull request. |
| Dependencies/UrlLib/Source/WebSocket_Android.cpp | Updated as part of this pull request. |
| Dependencies/UrlLib/Source/UrlRequest_UWP.cpp | Updated as part of this pull request. |
| Dependencies/UrlLib/README.md | Updated as part of this pull request. |
| Dependencies/UrlLib/LICENSE.md | Updated as part of this pull request. |
| Dependencies/UrlLib/CONTRIBUTING.md | Updated as part of this pull request. |
| Dependencies/UrlLib/.gitignore | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/UPSTREAM.md | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/webpack.config.js | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Win32/App.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Tests.TimeoutDispatcher.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Tests.Scheduling.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Tests.NodeApi.JavaScriptCore.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Tests.NodeApi.Hermes.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Tests.NodeApi.Chakra.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Tests.Console.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Scripts/tests.webAssembly.ts | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Scripts/tests.textEncoder.ts | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Scripts/tests.setup.ts | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Scripts/tests.performance.ts | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Scripts/tests.javaScript.all.ts | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Scripts/tests.console.ts | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Scripts/tests.abortController.ts | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Scripts/globals.d.ts | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/macOS/App.mm | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Linux/App.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/iOS/Info.plist | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/iOS/App.mm | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/App.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/App.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Android/settings.gradle | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Android/gradle/wrapper/gradle-wrapper.properties | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Android/gradle.properties | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Android/build.gradle | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Android/app/src/main/res/values/strings.xml | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Android/app/src/main/cpp/JNI.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Android/app/src/main/cpp/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Android/app/src/main/AndroidManifest.xml | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Android/app/src/androidTest/java/com/jsruntimehost/unittests/WebSocket.java | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Android/app/src/androidTest/java/com/jsruntimehost/unittests/Native.java | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Android/app/src/androidTest/java/com/jsruntimehost/unittests/Main.java | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Android/app/proguard-rules.pro | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Source/Android/.gitignore | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Assets/symlink_target.js | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/UnitTests/Assets/sample.json | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/package.json | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/babel-plugin-replace-bigint.js | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/.gitignore | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Tests/.babelrc | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/XMLHttpRequest/Source/XMLHttpRequest.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/XMLHttpRequest/Readme.md | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/XMLHttpRequest/Include/Babylon/Polyfills/XMLHttpRequest.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/XMLHttpRequest/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/WebSocket/Source/WebSocket.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/WebSocket/Include/Babylon/Polyfills/WebSocket.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/WebSocket/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/URL/Source/URLSearchParams.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/URL/Readme.md | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/URL/Include/Babylon/Polyfills/URL.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/URL/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/TextEncoder/Source/TextEncoder.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/TextEncoder/README.md | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/TextEncoder/Include/Babylon/Polyfills/TextEncoder.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/TextEncoder/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/TextDecoder/README.md | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/TextDecoder/Include/Babylon/Polyfills/TextDecoder.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/TextDecoder/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Scheduling/Source/TimeoutDispatcher.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Scheduling/Source/Scheduling.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Scheduling/Source/Scheduling.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Scheduling/Readme.md | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Scheduling/Include/Babylon/Polyfills/Scheduling.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Scheduling/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Performance/Source/Performance.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Performance/Include/Babylon/Polyfills/Performance.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Performance/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/File/Source/File.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/File/Readme.md | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/File/Include/Babylon/Polyfills/File.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/File/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Fetch/Source/Fetch.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Fetch/Readme.md | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Fetch/Include/Babylon/Polyfills/Fetch.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Fetch/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Console/Readme.md | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Console/Include/Babylon/Polyfills/Console.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Console/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Blob/Source/Blob.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Blob/InternalInclude/Babylon/Polyfills/BlobInternal.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Blob/Include/Babylon/Polyfills/Blob.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/Blob/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/AbortController/Source/AbortSignal.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/AbortController/Source/AbortController.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/AbortController/Source/AbortController.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/AbortController/Readme.md | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/AbortController/Include/Babylon/Polyfills/AbortController.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Polyfills/AbortController/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Plugins/DynamicScriptLoader/Source/DynamicScriptLoader.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Plugins/DynamicScriptLoader/Include/Babylon/Plugins/DynamicScriptLoader.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Plugins/DynamicScriptLoader/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Plugins/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/LICENSE.md | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Documentation/Readme.md | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Documentation/DebugJavaScriptDevTools.md | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/ScriptLoader/Include/Babylon/ScriptLoader.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/ScriptLoader/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/Source/js_native_api_v8_internals.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/Source/js_native_api_shared.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/Source/env.cc | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/Source/env_v8.cc | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/Source/env_javascriptcore.cc | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/packages.config | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/package-v8.json | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/package-jsc.json | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/nuget.config | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/Include/Engine/V8/napi/env.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/Include/Engine/QuickJS/napi/env.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/Include/Engine/JavaScriptCore/napi/env.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/Include/Engine/Hermes/napi/env.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/Include/Engine/Chakra/napi/env.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API/.clang-format | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API-JSI/utilities.cmake | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API-JSI/Source/env.cc | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API-JSI/packages.config | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API-JSI/nuget.config | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API-JSI/Include/napi/env.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API-JSI/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API-Extensions/include/napi/utilities.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API-Extensions/include/napi/pointer.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Node-API-Extensions/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/JsRuntime/Source/JsRuntime.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/JsRuntime/Include/Babylon/JsRuntimeScheduler.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/JsRuntime/Include/Babylon/JsRuntime.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/JsRuntime/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Foundation/Source/StandardStreamLoggerPlatform.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Foundation/Source/StandardStreamLogger.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Foundation/Source/StandardStreamLogger_Unix.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Foundation/Source/StandardStreamLogger_PosixOps.inl | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Foundation/Source/StandardStreamLogger_Apple.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Foundation/Source/StandardStreamLogger_Android.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Foundation/Source/PerfTrace.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Foundation/Source/DelayedTaskScheduler.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Foundation/Source/DebugTrace.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Foundation/Include/Babylon/StandardStreamLogger.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Foundation/Include/Babylon/PerfTrace.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Foundation/Include/Babylon/DebugTrace.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Foundation/Include/Babylon/Api.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/Foundation/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/V8Inspector/Source/V8InspectorTCP.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/V8Inspector/Source/V8InspectorSocket.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/V8Inspector/Source/V8InspectorClient.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/V8Inspector/Source/V8InspectorClient.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/V8Inspector/Include/V8InspectorAgent.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/V8Inspector/Include/V8Inc.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/V8Inspector/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/Source/V8Platform.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/Source/V8ForegroundTaskRunner.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/Source/AppRuntime_Win32.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/Source/AppRuntime_UWP.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/Source/AppRuntime_Unix.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/Source/AppRuntime_QuickJS.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/Source/AppRuntime_macOS.mm | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/Source/AppRuntime_JSI.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/Source/AppRuntime_JavaScriptCore.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/Source/AppRuntime_iOS.mm | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/Source/AppRuntime_Hermes.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/Source/AppRuntime_Chakra.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/Source/AppRuntime_Android.cpp | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/Include/Babylon/Dispatchable.h | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/Core/AppRuntime/CMakeLists.txt | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/CONTRIBUTING.md | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/.gitignore | Updated as part of this pull request. |
| Dependencies/JsRuntimeHost/.clang-format | Updated as part of this pull request. |
| Dependencies/CMakeLists.txt | Updated as part of this pull request. |
| CMakeLists.txt | Updated as part of this pull request. |
| BUILDING.md | Updated as part of this pull request. |
| .github/workflows/build-win32.yml | Updated as part of this pull request. |
| .github/workflows/build-macos.yml | Updated as part of this pull request. |
| .github/workflows/build-linux.yml | Updated as part of this pull request. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…orepo-step-3-jsruntimehost-urllib
Gate Android emulator and iOS simulator suites on changes to vendored JsRuntimeHost or UrlLib, using local sibling dependencies. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e36eed22-9b7f-4098-b915-8a84e714ebf7
Print const char* debug traces with the C-string format on iOS and macOS so their test apps do not interpret the buffer as an Objective-C object. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e36eed22-9b7f-4098-b915-8a84e714ebf7
android-emulator-runner executes each script line as a separate sh command; keep project directory and connectedAndroidTest arguments on the same invocation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e36eed22-9b7f-4098-b915-8a84e714ebf7
Keep the upstream move of Hermes builds to nightly while retaining runtime-source detection for the remaining Android and iOS PR jobs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e36eed22-9b7f-4098-b915-8a84e714ebf7
Keep BabylonNative and embedded JsRuntimeHost unit-test execution paired after upstream moves Hermes configurations out of PR CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e36eed22-9b7f-4098-b915-8a84e714ebf7
| directory from the final tree; it remains available throughout the imported | ||
| history. | ||
|
|
||
| To update, clone upstream `main` afresh, check its tip and all reachable |
There was a problem hiding this comment.
Remove this file and the matching JsRuntimeHost/UPSTREAM.md. These projects are moving into BabylonNative; there will not be an upstream repository to synchronize with.
| @@ -4,8 +4,12 @@ | |||
| design. Most external sources are now acquired with CMake FetchContent. | |||
| `Dependencies/bgfx.cmake` is tracked wrapper code with imported file history; | |||
| its bgfx, bx and bimg sources remain pinned external FetchContent acquisitions. | |||
| AndroidExtensions and CMakeExtensions are vendored with imported history under | |||
| `Dependencies/`; root source overrides make all FetchContent declarations use them. | |||
| AndroidExtensions, CMakeExtensions, JsRuntimeHost and UrlLib are vendored with | |||
There was a problem hiding this comment.
Update this section and BUILDING.md to describe components maintained in this repository and built with add_subdirectory, rather than vendored dependencies managed through FetchContent overrides.
| # _deps/*-src copies are no longer produced for these dependencies. | ||
| set(FETCHCONTENT_SOURCE_DIR_ANDROIDEXTENSIONS "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/AndroidExtensions") | ||
| set(FETCHCONTENT_SOURCE_DIR_CMAKEEXTENSIONS "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/CMakeExtensions") | ||
| set(FETCHCONTENT_SOURCE_DIR_JSRUNTIMEHOST "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/JsRuntimeHost") |
There was a problem hiding this comment.
Use add_subdirectory for JsRuntimeHost and UrlLib, and remove their FetchContent declarations and overrides. Remove the old repository fetches for the components now maintained here from their nested CMakeLists.txt files too.
| (UNIX AND NOT ANDROID AND NOT APPLE))) | ||
| set(JSRUNTIMEHOST_TESTS ON) | ||
| else() | ||
| set(JSRUNTIMEHOST_TESTS OFF) |
There was a problem hiding this comment.
Restore the runtime's Android emulator/iOS simulator tests, Linux AddressSanitizer/UndefinedBehaviorSanitizer and macOS/Linux ThreadSanitizer runs, Win32 x86 builds, and Windows Store x64 JSI/V8 builds, or link follow-up issues for the omissions.
| if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR AND NOT IOS AND NOT ANDROID) | ||
| option(URLLIB_TESTS "Build the UrlLib unit tests." ON) | ||
| else() | ||
| option(URLLIB_TESTS "Build the UrlLib unit tests." OFF) |
There was a problem hiding this comment.
Preserve the former Windows, macOS and Linux UrlLibTests coverage in this repository's continuous integration jobs; the suite currently defaults OFF and is not run.
| Use a git-enabled terminal to run the following command. | ||
|
|
||
| ``` | ||
| git clone https://github.com/BabylonJS/JsRuntimeHost.git |
There was a problem hiding this comment.
Update the clone/build instructions and build-status badge to point to BabylonNative and the new component location, not the old standalone repository.
| shell: powershell | ||
| run: | | ||
| Copy-Item -Path "build\${{ steps.vars.outputs.solution_name }}\Apps\UnitTests\RelWithDebInfo\UnitTests.*" -Destination "$env:RUNNER_TEMP\Dumps\" -ErrorAction SilentlyContinue | ||
| Copy-Item -Path "build\${{ steps.vars.outputs.solution_name }}\_deps\jsruntimehost-build\Tests\UnitTests\RelWithDebInfo\JsRuntimeHostUnitTests.*" -Destination "$env:RUNNER_TEMP\Dumps\" -ErrorAction SilentlyContinue |
There was a problem hiding this comment.
Add a LocalDumps\JsRuntimeHostUnitTests.exe entry so crashes in the renamed runtime suite produce dumps in the uploaded directory.

History-preserving landing required - DO NOT SQUASH. Squashing would discard the imported file histories. Upstream currently allows only squash merges; a maintainer must arrange a history-preserving merge as for step 2 (#1944). Please do not merge this draft until that is arranged.
Scope
mainhistories as separate, unrelated-history merges: JsRuntimeHost 151 commits, original980cfb0197f7fda661d362df4b275cff42d1e7f2-> rewrittenc3979a068492a70f110e819d17390d42c1f18ff1; UrlLib 53 commits, original0c991337a1160ba7a2d062bf8e342d0a66f48dc9-> rewritten6bf23f200b4e430ab21377a5591cac1a7af96fb4. Both upstream tips equal the former BabylonNative/JsRuntimeHost pins: no version upgrade.git filter-repo --to-subdirectory-filter Dependencies/<name> --prune-empty never --prune-degenerate never --preserve-commit-hashes --preserve-commit-encoding; complete commit-map verification of identities, dates, full messages, mapped parents, empty commits, file modes/blob IDs and prefixed trees; no historical gitlinks. Imported source histories, licenses and notices remain unchanged. Path rewriting necessarily changes commit IDs and invalidates original signatures..github/directories from the final tree (14 CI/issue-template files); their contents remain accessible in the imported histories. EachUPSTREAM.mdexplains this update procedure._deps/*-srccompatibility copies for these four vendored dependencies are not produced, while binary_deps/*-buildfolders remain. Updated build documentation and per-folder UPSTREAM.md.WIN32except Windows Store, macOS except iOS/visionOS, desktop Unix). The embedded target isJsRuntimeHostUnitTeststo avoid the existingUnitTestscollision; standalone JsRuntimeHost still usesUnitTests. Tests remain disabled for no-app/install-only and mobile/UWP builds. The existing Windows, Linux and macOS CI jobs build and execute the suite alongside BabylonNative UnitTests with the same test-run conditions (including Windows D3D12 exclusion); no separate path-filtered workflow remains.Dependencies/JsRuntimeHostorDependencies/UrlLibchanges, the existing four Android engine jobs also execute the standalone JsRuntimeHost instrumentation suite on an API 33 x86_64 emulator, and the existing iOS job builds and executes the standalone test app on an iPhone simulator. Both use in-tree sibling dependencies; the Android Hermes test run reclaims disk space before building. These mobile test harnesses are separate from BabylonNative's desktop-only unit-test targets. Other changes leave mobile builds unchanged.d32a00148ef68b9681bcc76b19fbf7ecb657b727; merged upstream68806b61b4977e8e8cd99d1e001b2e44412c358fafter it advanced during validation. No unrelated fork-only changes.Windows validation
git log --followtraverses imported histories. The final trees intentionally omit the 14 imported.github/files and include the subsequent test integration adjustment.cmake -S <committed-checkout> -B <build> -G "Visual Studio 17 2022" -A x64 -DGRAPHICS_API=D3D11 -DNAPI_JAVASCRIPT_ENGINE=Chakra, and separately with-DBABYLON_NATIVE_BUILD_SOURCETREE=ON; both passed. The original normal configure supplied deliberately stale-DFETCHCONTENT_SOURCE_DIR_JSRUNTIMEHOST=D:\stale\jsruntimehost -DFETCHCONTENT_SOURCE_DIR_URLLIB=D:\stale\urllib: generated AppRuntime/UrlLib projects used the vendored sources, without new source/subbuild acquisitions.cmake --build <desktop-build> --config RelWithDebInfo --target UnitTests JsRuntimeHostUnitTests --parallel 8succeeded; BabylonNative 169/169 and embedded JsRuntimeHost 31/31 passed. An initial JS fetch test run received a transient HTTP 504; its retry and a complete suite retry passed. Fresh-DBABYLON_NATIVE_BUILD_APPS=OFF -DJSRUNTIMEHOST_TESTS=ONconfigure generated neither UnitTests target; a separate standalone JsRuntimeHost configure/build/run retainedUnitTestsand passed 31/31. Workflow YAML and platform/test-condition parity were checked.ModuleLoadTest.exe: PASS.Playground.exe --headless --once --test "Native Canvas" app:///Scripts/validation_native.js: ran=1 passed=1 failed=0, exit 0; pixel difference within configured tolerance..github/workflows/test-install-win32.ymlrecipe with-DBABYLON_NATIVE_BUILD_APPS=OFF -DBABYLON_DEBUG_TRACE=ON: full build,cmake --install, andcmake -S Install/Test -D INSTALL_DIR=<install-prefix>plus consumer build all passed before the test-gating follow-up. The follow-up's no-app configure again confirmed the embedded tests are absent. The consumer still fetches standalone CMakeExtensions by design.actionlintpassed forci.yml,build-android.yml, andbuild-ios.yml; parsed and checked reusable inputs, all five caller jobs, conditional execution steps, and the CI completion gate. Git diff checks distinguished changed from unchanged vendored paths. Android emulator and iOS simulator tests cannot run on this Windows host; CI must validate both mobile builds and test runs.E: had insufficient free space for unrelated fetched bgfx and npm assets, so earlier build validation used an exact workspace-delta checkout and short build folders on D:. Mobile CI changes did not require a local native build. macOS, Linux, mobile and other graphics backends were not run locally; existing CI is responsible for those checks.