Repository navigation
Add dedicated NativeAOT WASM build integration for WASI - #135955
Open
MichalStrehovsky wants to merge 1 commit into
Open
MichalStrehovsky wants to merge 1 commit into
MichalStrehovsky wants to merge 1 commit into
Conversation
Use WASI SDK clang/llvm-ar and portable runtime archives to produce .wasm components. Keep WASM off Unix/ELF linker, linker-script, and symbol-stripping paths; retain embedded debug information. Default dehydration and managed stack traces off: their metadata formats encode relative function pointers, incompatible with WASM table indices. Keep WASI toolchain setup distinct from architecture selection and reject unsupported target OSes, shared libraries, and multi-module compilation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a6f3a617-acae-4f4f-95d3-20b2a0bac43c
|
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. |
Contributor
|
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib |
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
This was referenced Oct 16, 2026
Open
This branch was successfully deployed
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.
Summary
Add a dedicated NativeAOT WASM linker backend, with initial WASI support.
Use WASI SDK Clang and llvm-ar, portable runtime archives, and the required native dependencies to produce
.wasmcomponents targetingwasm32-wasip2. Keep WASM off Unix/ELF linker, linker-script, and objcopy stripping paths.StripSymbolsis ignored on WASM, retaining embedded debug information.Default data dehydration and managed stack-trace metadata off for WASM: their relative-function-pointer formats do not fit WASM table-index function pointers. Explicitly reject those unsupported formats, shared libraries, multi-module compilation, and aggregate executables.
Architecture selection is separate from WASI toolchain configuration; this does not treat all WASM as WASI or add browser linking support.
WASI_SDK_PATHselects the SDK.Validation
On the combined local NativeAOT WASI bringup tree, including other unmerged enablement:
.\dotnet.cmd msbuild src\coreclr\nativeaot\BuildIntegration\BuildIntegration.proj /t:Build /p:Configuration=Checked /p:TargetOS=wasi /p:TargetArchitecture=wasm /nologo /v:minimalpassed..\src\tests\build.cmd nativeaot checked test nativeaot\SmokeTests\AttributeTrimming\AttributeTrimming.csproj wasm wasipassed after forced regeneration/relinking; Wasmtime execution returned 100.StripSymbols=true, and SDK Clang selects the component linker without an explicit-fuse-ld.This branch contains only this cherry-picked commit from
main; it was not built independently. Unix hosts and browser targets were not built or run.Note
This PR description was generated by GitHub Copilot.