Repository navigation
[wasi] Stand up CoreCLR-WASI library tests #130129
Copy link
Copy link
Open
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-Metaos-wasiRelated to WASI variant of arch-wasmRelated to WASI variant of arch-wasm
Milestone
Description
Follow-up to #130051 (CoreCLR-WASI bring-up). Once that PR lands with runtime-test coverage, the natural next milestone is standing up library tests on CoreCLR-WASI, mirroring the browser-CoreCLR LibraryTestsCoreCLR legs.
The Mono-WASI library-test infrastructure (src/libraries/sendtohelix-wasi.targets, src/mono/wasi/build/WasiApp.targets, Helix/wasmtime staging) is largely reusable — the gaps below are specific to swapping the Mono runtime pack for CoreCLR-WASI.
Gaps
1. Runtime pack
WasiApp.targetstoday consumesMicrosoft.NETCore.App.Runtime.wasi-wasm, which is Mono-only.- Need a CoreCLR variant (or a
RuntimeFlavor-conditional selector in the existing pack) socorerun.wasm+ native libs land alongside CoreLib. - Same story libs already had for browser-CoreCLR (
Microsoft.NETCore.App.Runtime.browser-wasm.CoreCLR) — pattern is portable.
2. App-builder for CoreCLR-WASI
WasiApp.targetsproduces a Mono-driver-shaped image (mono-wasi-driver.c linkage, ICU shims baked to Mono).- CoreCLR-WASI needs the
corerun+ Bundle layout we already stage for runtime tests — either extendWasiApp.targetswith a CoreCLR branch, or add a siblingWasiApp.CoreCLR.targetsthat reuses the Helix envelope but swaps the payload shape. - The wasmtime-staging + PATH-prepend logic in
helixpublishwitharcade.proj(from [wasm][wasi] CoreCLR wasi onboarding #130051) should hoist into a shared target.
3. Xunit test runner
- Browser LibraryTests uses
Microsoft.DotNet.XHarness.TestRunners.XunitviaWasmTestRunner. - Browser-CoreCLR
LibraryTestsCoreCLRuses a slimmer runner project because the full XHarness runner had SDK deps that didn't fit CoreCLR wasm. - WASI-CoreCLR wants the same slimmer runner, retargeted for wasi-wasm and callable from
corerun.wasm --library <TestAssembly>.dll(or an equivalent entry-point wrapper).
4. P/Invoke surface expansion
- Runtime tests exercise a tiny p/invoke set. Library tests hit sockets, FS, TZ data, ICU, threading, timers, crypto, RNG, etc.
- Every one of those needs either a WASI resolver in the callhelpers-pinvoke tables or a
PlatformNotSupportedExceptionshort-circuit. - Mono-WASI already dealt with most of this —
pal_wasi_missing.hand the WASI-side callhelpers will grow substantially.
5. Test exclusions
- The Mono-WASI test tree already carries
[SkipOnPlatform(TestPlatforms.Wasi, …)]andIsWasiApplicable=falsegating for chunks that fundamentally don't fit WASI (threading, subprocess, listening sockets, dup,mmap, etc.). - CoreCLR-WASI inherits most of that gating but will surface new failures around finalization semantics, R2R behavior,
Task.Runcontinuations, and other CoreCLR-specific corners. Fresh triage sweep will be needed.
6. CI wiring
- New template
eng/pipelines/common/templates/wasi-wasm-coreclr-library-tests.ymlmirroringwasm-coreclr-library-tests.yml. - Add legs to
runtime.yml, wire helix queues inhelix-queues-setup.yml. - Start with a smoke sub-leg (
System.Runtime.Tests+System.Collections.Tests) analogous toLibraryTests_Smoke_AOT.
Suggested phasing
- Smoke — land runtime pack + minimal app-builder + slim runner → single-library smoke leg (
System.Runtime.Testsonly). Forces items 1 + 2 + 3 to be real. Rough estimate: ~1–2 weeks. - Import Mono-WASI exclusion set wholesale into the CoreCLR-WASI test config.
- Broaden coverage — enable one library at a time, file exclusions and p/invoke resolvers as we go, until parity with the browser-CoreCLR
LibraryTestsCoreCLRleg. Rough estimate: ~1–2 months, mostly items 4 + 5.
Related:
- [wasm][wasi] CoreCLR wasi onboarding #130051 (CoreCLR-WASI runtime tests, precursor)
- [wasm][wasi] CoreCLR-WASI runtime-test exclusions tracking issue #130064 (known WASI-specific runtime test failures)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-Metaos-wasiRelated to WASI variant of arch-wasmRelated to WASI variant of arch-wasm
Type
Projects
- StatusShow more project fieldsNo status
Activity
dotnet-policy-service commentedon Jul 2, 2026
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.
dotnet-policy-service commentedon Jul 2, 2026
Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.
dotnet-policy-service commentedon Jul 10, 2026
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.
[wasm] Fix reverse P/Invoke thunk key for nested [UnmanagedCallersOnl…
[wasi] Stand up CoreCLR-WASI library-test smoke leg
[wasi] Add WasiHost-Static archive for CoreCLR-WASI per-app relink
[wasi] Relink corerun per-app in WasiApp.CoreCLR.targets
[wasi] Fix corerun relink: whole-archive host + full VM define set
[wasi] Stand up CoreCLR-WASI library-test leg (per-app corerun relink) (
Adapt WASI R2R composition to self-installing WebCIL v2
[wasi] Enable CoreCLR WASI composite ReadyToRun publishing (#133265)
[wasi] Rework CoreCLR WASI library test exclusions
[wasi] Rework CoreCLR WASI library test exclusions
[wasi] Rework CoreCLR WASI library test exclusions
[wasi] Rework CoreCLR WASI library test exclusions
[wasi] Rework CoreCLR WASI library test exclusions
[wasi] Rework CoreCLR WASI library test exclusions
[wasi] Add CoreCLR ReadyToRun library and runtime test CI (#134813)