Skip to content

Add Browser_CoreCLR job for building wasm coreclr runtime pack - #5954

Merged
akoeplinger merged 2 commits into
mainfrom
browser-wasm-coreclr
Apr 10, 2026
Merged

akoeplinger merged 2 commits into
mainfrom
browser-wasm-coreclr

Conversation

@akoeplinger

Copy link
Copy Markdown
Member

No description provided.

@akoeplinger
akoeplinger requested a review from a team as a code owner April 9, 2026 17:10
Copilot AI review requested due to automatic review settings April 9, 2026 17:10
@akoeplinger
akoeplinger requested a review from a team as a code owner April 9, 2026 17:10
@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team April 9, 2026 17:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 a new Browser/CoreCLR vertical build and refactors the WasmAppBuilder MSBuild tasks to support both Mono and CoreCLR variants side-by-side (via separate namespaces and conditional task registration), enabling CoreCLR browser runtime pack builds.

Changes:

  • Split Mono/CoreCLR WasmAppBuilder generator code into distinct namespaces and wire up conditional <UsingTask> registrations.
  • Update Webcil conversion task usage to the new task namespaces.
  • Add a new Browser_CoreCLR_Shortstack VMR pipeline job and adjust runtime build defaults for TargetOS=browser.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
src/runtime/src/tasks/WasmAppBuilder/WebcilConverter.cs Removes obsolete using WasmAppBuilder after namespace consolidation.
src/runtime/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj Removes compile-time flavor filtering and conditionally registers Mono/CoreCLR ManagedToNativeGenerator tasks.
src/runtime/src/tasks/WasmAppBuilder/mono/SignatureMapper.cs Moves Mono signature mapping into Microsoft.WebAssembly.Build.Tasks.Mono.
src/runtime/src/tasks/WasmAppBuilder/mono/PInvokeTableGenerator.cs Moves Mono pinvoke table generation into ...Tasks.Mono.
src/runtime/src/tasks/WasmAppBuilder/mono/PInvokeCollector.cs Moves Mono pinvoke collection into ...Tasks.Mono.
src/runtime/src/tasks/WasmAppBuilder/mono/ManagedToNativeGenerator.cs Moves Mono generator task into ...Tasks.Mono and passes isCoreClr:false to icall generation.
src/runtime/src/tasks/WasmAppBuilder/mono/InterpToNativeGenerator.cs Moves Mono interp-to-native generator into ...Tasks.Mono.
src/runtime/src/tasks/WasmAppBuilder/LogAdapter.cs Moves LogAdapter into Microsoft.WebAssembly.Build.Tasks.
src/runtime/src/tasks/WasmAppBuilder/IcallTableGenerator.cs Adds CoreCLR/Mono signature mapping switch via new isCoreClr parameter.
src/runtime/src/tasks/WasmAppBuilder/coreclr/SignatureMapper.cs Moves CoreCLR signature mapping into Microsoft.WebAssembly.Build.Tasks.CoreClr.
src/runtime/src/tasks/WasmAppBuilder/coreclr/PInvokeTableGenerator.cs Moves CoreCLR pinvoke generation into ...Tasks.CoreClr.
src/runtime/src/tasks/WasmAppBuilder/coreclr/PInvokeCollector.cs Moves CoreCLR pinvoke collection into ...Tasks.CoreClr.
src/runtime/src/tasks/WasmAppBuilder/coreclr/ManagedToNativeGenerator.cs Moves CoreCLR generator task into ...Tasks.CoreClr and passes isCoreClr:true.
src/runtime/src/tasks/WasmAppBuilder/coreclr/InterpToNativeGenerator.cs Moves CoreCLR interp-to-native generator into ...Tasks.CoreClr.
src/runtime/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ConvertDllsToWebCil.cs Updates LogAdapter construction to the new namespace.
src/runtime/src/native/managed/compile-native.proj Fixes MSBuild condition to properly compare boolean string values.
src/runtime/src/mono/wasm/build/WasmApp.Common.targets Registers Mono/CoreCLR ManagedToNativeGenerator tasks conditionally by $(WasmAppRuntimeFlavor).
src/runtime/src/mono/wasi/wasi.proj Updates UsingTask to the namespaced Mono ManagedToNativeGenerator task.
src/runtime/src/mono/browser/build/BrowserWasmApp.targets Sets default WasmApp runtime flavor for browser builds.
src/runtime/src/mono/browser/browser.proj Updates UsingTask to the namespaced Mono ManagedToNativeGenerator task.
src/runtime/eng/Subsets.props Adds browser+CoreCLR default subset selection.
repo-projects/runtime.proj Adjusts browser builds to set RuntimeFlavor=CoreCLR and avoid building all runtime packs.
eng/pipelines/templates/stages/vmr-verticals.yml Adds Browser_CoreCLR_Shortstack build job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jkoritzinsky jkoritzinsky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we instead put single-threaded browser-WASM on the same plan as all other platforms (producing CoreCLR and Mono packs in the same build)?

@akoeplinger

akoeplinger commented Apr 9, 2026 •

Copy link
Copy Markdown
Member Author

I tried but there were some complications. I'll try again when I'm back from vacation. In any case this split is here just for a couple months ;)

@akoeplinger
akoeplinger merged commit 70406e7 into main Apr 10, 2026
11 checks passed
@akoeplinger
akoeplinger deleted the browser-wasm-coreclr branch April 10, 2026 05:59
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