Skip to content

Conversation

@pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Oct 29, 2025

  • adds dummy version of clr.nativecorelib that just copies System.Private.CoreLib.dll to expected place
  • adds PlatformManifestFileEntry for new libraries
  • disabled PublishReadyToRun until [User Story] RyuJIT for WebAssembly (Wasm) #121141
  • install static libraries into sharedFramework only in native cmake root. Otherwise those from coreclr tree are duplicates when we create runtime pack.

Fixes #120206

@pavelsavara pavelsavara added this to the 11.0.0 milestone Oct 29, 2025
@pavelsavara pavelsavara self-assigned this Oct 29, 2025
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-Host os-browser Browser variant of arch-wasm labels Oct 29, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.

@pavelsavara pavelsavara marked this pull request as ready for review October 31, 2025 12:14
Copilot AI review requested due to automatic review settings October 31, 2025 12:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds CoreCLR WASM support to the runtime build system. The changes enable building CoreCLR for browser targets alongside the existing Mono support.

  • Adds CORERUN_LIBS_ONLY conditional gates to prevent installing runtime-specific native libraries to the sharedFramework when building for test scenarios
  • Includes CoreCLR WASM-specific native files in the platform manifest for browser targets
  • Disables crossgen/R2R for browser/WASI targets and implements a copy-only strategy for CoreLib
  • Updates the default CoreCLR subset for browser targets to include clr.nativecorelib
  • Modifies CI pipeline to build packs in addition to clr+libs for WASM

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/native/libs/System.Native/CMakeLists.txt Adds CORERUN_LIBS_ONLY guards around install commands for System.Native-Static and TimeZoneData libraries
src/native/libs/System.Native.Browser/CMakeLists.txt Adds CORERUN_LIBS_ONLY guard around install command for System.Native.Browser-Static
src/native/libs/System.Globalization.Native/CMakeLists.txt Adds CORERUN_LIBS_ONLY guards around install commands for globalization libraries and ICU files
src/native/libs/Common/JavaScript/CMakeLists.txt Adds CORERUN_LIBS_ONLY guard around install commands for JavaScript rollup outputs
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj Disables PublishReadyToRun for browser and wasi targets
src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props Adds CoreCLR WASM-specific native library files to platform manifest entries
src/coreclr/crossgen-corelib.proj Adds browser-specific target that copies CoreLib instead of running crossgen
eng/pipelines/runtime.yml Updates browser_wasm build to include packs subset
eng/Subsets.props Adds clr.nativecorelib to default CoreCLR subsets for browser targets

<Copy SourceFiles="@(CoreLib)" DestinationFiles="$(CoreLibOutputPath)" UseHardlinksIfPossible="true" />
</Target>


Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

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

Remove the extra blank line (line 109) between the InvokeCrossgenBrowser and InvokeCrossgen targets to maintain consistent spacing throughout the file.

Suggested change

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +26
<!-- Disable crossgen on NetBSD, illumos, Solaris, Haiku and WASM for now. This can be revisited when we have full support. -->
<PublishReadyToRun Condition="'$(TargetOS)' == 'netbsd' or '$(TargetOS)' == 'illumos' or '$(TargetOS)' == 'solaris' or '$(TargetOS)' == 'haiku' or '$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi'">false</PublishReadyToRun>
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a separate line for WASM as the reasoning there is different? (Supported platform where we actually have a plan vs community platforms where community members haven't gotten it wired up yet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Host os-browser Browser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[browser][coreCLR] create runtime pack

2 participants