Skip to content

[WASI] Acquire the WASI SDK for runtime build automatically and centrally - #119253

Merged
pavelsavara merged 6 commits into
dotnet:mainfrom
SingleAccretion:WASI-SDK-Proj
Sep 3, 2025
Merged

pavelsavara merged 6 commits into
dotnet:mainfrom
SingleAccretion:WASI-SDK-Proj

Conversation

@SingleAccretion

@SingleAccretion SingleAccretion commented Sep 1, 2025 •

Copy link
Copy Markdown
Contributor

I was after a few things with this change:

  1. Reducing the number of places that need to be manually updated on a WASI SDK bump, i. e. getting rid of the sentinel file.
  2. Decoupling the WASI SDK acquisition from the Mono build.
  3. Improving ergonomics of WASI SDK acquisition (reduce manual steps required to use the repository).

All of these have been achieved with this change. See my inline comments for details.

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Sep 1, 2025
Can be replaced with "-lstdc++", expanded to "-lc++" + "-lc++abi" by clang.
Comment thread eng/AcquireWasiSdk.targets Resolved
Comment thread eng/AcquireWasiSdk.targets Resolved
Comment thread eng/testing/tests.wasi.targets Resolved
Comment thread src/mono/wasi/wasi.proj Resolved
Comment thread src/mono/wasi/wasi.proj Resolved
Comment thread eng/AcquireWasiSdk.targets Resolved
@SingleAccretion
SingleAccretion marked this pull request as ready for review September 2, 2025 18:03
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture os-wasi Related to WASI variant of arch-wasm labels Sep 2, 2025
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@pavelsavara

Copy link
Copy Markdown
Member

/azp run runtime-wasm

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@SingleAccretion

Copy link
Copy Markdown
Contributor Author

Well, the WASI build looks a bit better than before, but the AOT on Helix is having a hard time... Some instances of:

memory fault at wasm address 0x7568633c in linear memory of size 0x3200000

Some instances of clang OOMing.

At least the WASI SDK was transported there properly.

@pavelsavara pavelsavara self-assigned this Sep 3, 2025
@pavelsavara

pavelsavara commented Sep 3, 2025 •

Copy link
Copy Markdown
Member

Some instances of clang OOMing.

I worked this around this by #115624 for browser.
Essentially not -g for AOT builds on CI.
I will create another PR with that for WASI and consolidate those things

@maraf maraf 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.

Changes look good to me 👍
We are also building WASI SDK packages, longer term question is if should migrate to it. It can then be part of WASI workload.

@pavelsavara Please provide your feedback, as you have been working on WASI more closely.

@pavelsavara

Copy link
Copy Markdown
Member
memory fault at wasm address 0x7568633c in linear memory of size 0x3200000

I created #119299 for that

Comment thread eng/AcquireWasiSdk.targets Resolved

@pavelsavara pavelsavara 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.

much better than what we had so far, many thanks!

I tested it locally on windows.

Comment thread eng/download-wasi-sdk.ps1 Resolved

@akoeplinger akoeplinger 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.

one nit, looks good otherwise

Comment thread src/mono/mono.proj Resolved
@pavelsavara

Copy link
Copy Markdown
Member

/ba-g CI failures are unrelated

@pavelsavara
pavelsavara merged commit b8fe805 into dotnet:main Sep 3, 2025
@SingleAccretion
SingleAccretion deleted the WASI-SDK-Proj branch September 3, 2025 17:38
filipnavara pushed a commit to filipnavara/runtime that referenced this pull request Sep 5, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-Build-mono community-contribution Indicates that the PR has been added by a community member os-wasi Related to WASI variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants