From 560b7448c8818cca534729c809324953e0faa12a Mon Sep 17 00:00:00 2001 From: David Wrighton Date: Thu, 23 Jul 2026 11:06:43 -0700 Subject: [PATCH 1/2] Name crossgen'd wasm System.Private.CoreLib as ready (drop NotReadyYet infix) The wasm R2R crossgen output for System.Private.CoreLib was parked at System.Private.CoreLib.NotReadyYet.wasm so it would not be picked up as the corelib image. Emit it as System.Private.CoreLib.wasm so the crossgen'd ReadyToRun image is the one packaged and loaded. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a5c93aa6-580b-4f11-ac30-860081fab183 --- src/coreclr/crossgen-corelib.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/crossgen-corelib.proj b/src/coreclr/crossgen-corelib.proj index ee6290d6c689b2..82eab8b98729e4 100644 --- a/src/coreclr/crossgen-corelib.proj +++ b/src/coreclr/crossgen-corelib.proj @@ -72,7 +72,7 @@ - $([MSBuild]::NormalizePath('$(BinDir)', '$(CoreLibAssemblyName).NotReadyYet.wasm')) + $([MSBuild]::NormalizePath('$(BinDir)', '$(CoreLibAssemblyName).wasm')) From d5fd1e19e331f8240ceb63f51d8fc231afd0cd09 Mon Sep 17 00:00:00 2001 From: David Wrighton Date: Tue, 28 Jul 2026 14:37:15 -0700 Subject: [PATCH 2/2] Load System.Private.CoreLib (and other dlls) from CORE_ROOT as WASM if present. --- src/coreclr/hosts/corerun/corerun.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/coreclr/hosts/corerun/corerun.cpp b/src/coreclr/hosts/corerun/corerun.cpp index 3ab04343b8a052..49908c2675ac74 100644 --- a/src/coreclr/hosts/corerun/corerun.cpp +++ b/src/coreclr/hosts/corerun/corerun.cpp @@ -385,6 +385,10 @@ static bool HOST_CONTRACT_CALLTYPE external_assembly_probe( std::string full_path = dir; assert(full_path.back() == pal::dir_delim); full_path.append(name); +#ifdef TARGET_BROWSER + if (BrowserHost_ExternalAssemblyProbe(full_path.c_str(), data_start, size)) + return true; +#endif // TARGET_BROWSER if (pal::try_map_file_readonly(full_path.c_str(), data_start, size)) return true; }