[wasm] Package CoreCLR native symbol map - #134010
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
This was referenced Sep 16, 2026
lewing
marked this pull request as ready for review
September 16, 2026 14:39
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
pavelsavara
reviewed
Sep 16, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The reviewed changes and validation coverage show no unresolved blocking issues.
Review tier: Lite
Findings: None
What changed in this PR
Adds CoreCLR’s WebAssembly native symbol map to runtime packs and preserves its integrity hash through publishing.
Changes:
- Packages
dotnet.native.js.symbolsfor CoreCLR. - Propagates symbol-map hashes through boot resources and type declarations.
- Adds packaging, fingerprinting, and parser-based validation tests.
| File | Description |
|---|---|
src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/BootJsonData.cs |
Adds symbol asset hash data. |
src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/BootJsonBuilderHelper.cs |
Emits symbol-map hashes in boot resources. |
src/native/libs/Common/JavaScript/types/public-api.ts |
Updates native asset types. |
src/native/libs/Common/JavaScript/loader/dotnet.d.ts |
Updates native declarations. |
src/mono/wasm/Wasm.Build.Tests/ModuleConfigTests.cs |
Tests emission, fingerprinting, and integrity pairing. |
src/mono/wasm/Wasm.Build.Tests/CoreCLRWasmNativeDefaultsTests.cs |
Validates WebAssembly and symbol-map consistency. |
src/mono/browser/runtime/types/index.ts |
Updates Mono asset types. |
src/mono/browser/runtime/dotnet.d.ts |
Updates Mono declarations. |
eng/liveBuilds.targets |
Harvests the CoreCLR native symbol map. |
maraf
approved these changes
Sep 17, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0e7a5257-2a84-497d-864c-aebcd675504c
Member
Author
|
@maraf @pavelsavara I think I have addressed the review |
pavelsavara
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CoreCLR browser builds already generate Emscripten's
dotnet.native.js.symbols, but the browser runtime.nupkgdid not contain it. This adds the existing file to the CoreCLR runtime-pack harvest, matching Mono, soWasmEmitSymbolMap=truecan publish native symbols without forcing an application relink.The Emscripten
index:namepayload remains unchanged. The boot resource model now retains the symbols file's SHA-256 alongside the existing final-wasm SHA-256, so fingerprinted published files can be discovered and verified as an exact pair.Validation includes an independent WebAssembly import/function/code/export parser and Emscripten-map parser. It verifies absolute module function indices include imports, checks runtime/interpreter/libc/exported/compiler-generated anchors, and rejects shifted indices, stale wasm identity, and mutated symbol-map bytes.
Current Release artifacts:
dotnet.native.wasm4abe2a6ca7e5cc5f8bc674d0a111e7e3e3ed1f78cc2c28a0387d74b8ce22fd04dotnet.native.js.symbols19b6b201a88b019db6b822a2baf3e5a8022f54ef4e385633b931255e80b1ef4bThe runtime
.nupkggrew from 71,838,978 to 71,984,589 bytes (+145,611 bytes, 0.20%). Application publish remains opt-in throughWasmEmitSymbolMap.Live Chrome/CDP cross-check:
BrowserHost_ExecuteAssembly.$func2243; the map resolves index 2243 toInterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*).$func2276resolves toExecuteInterpretedMethod.R2R transition thunks are functions in separately loaded Webcil modules and remain covered by their module-local name sections from #132906; they are intentionally not folded into this native-host map.
Validation run:
PATH=/opt/homebrew/bin:$PATH ./build.sh -os browser -c Release -subset clr+libsWasm.Build.Tests.ModuleConfigTests.RuntimePackSymbolMapMatchesFinalWasm— 1 passedWasm.Build.Tests.ModuleConfigTests.RuntimePackSymbolMapRejectsIndexAndIdentityMismatches— 1 passedWasm.Build.Tests.ModuleConfigTests.SymbolMapFileEmitted— build and publish cases passed, including fingerprinted static assetsWasm.Build.Tests.ModuleConfigTests.SymbolMapFileNotEmitted— build and publish opt-out cases passedResolves #134009
Note
This pull request was generated by GitHub Copilot.