You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.targets today consumes Microsoft.NETCore.App.Runtime.wasi-wasm, which is Mono-only.
Need a CoreCLR variant (or a RuntimeFlavor-conditional selector in the existing pack) so corerun.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.targets produces 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 extend WasiApp.targets with a CoreCLR branch, or add a sibling WasiApp.CoreCLR.targets that reuses the Helix envelope but swaps the payload shape.
Browser LibraryTests uses Microsoft.DotNet.XHarness.TestRunners.Xunit via WasmTestRunner.
Browser-CoreCLR LibraryTestsCoreCLR uses 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 PlatformNotSupportedException short-circuit.
Mono-WASI already dealt with most of this — pal_wasi_missing.h and the WASI-side callhelpers will grow substantially.
5. Test exclusions
The Mono-WASI test tree already carries [SkipOnPlatform(TestPlatforms.Wasi, …)] and IsWasiApplicable=false gating 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.Run continuations, 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.yml mirroring wasm-coreclr-library-tests.yml.
Add legs to runtime.yml, wire helix queues in helix-queues-setup.yml.
Start with a smoke sub-leg (System.Runtime.Tests + System.Collections.Tests) analogous to LibraryTests_Smoke_AOT.
Suggested phasing
Smoke — land runtime pack + minimal app-builder + slim runner → single-library smoke leg (System.Runtime.Tests only). 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 LibraryTestsCoreCLR leg. Rough estimate: ~1–2 months, mostly items 4 + 5.
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
LibraryTestsCoreCLRlegs.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.RuntimeFlavor-conditional selector in the existing pack) socorerun.wasm+ native libs land alongside CoreLib.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).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.helixpublishwitharcade.proj(from [wasm][wasi] CoreCLR wasi onboarding #130051) should hoist into a shared target.3. Xunit test runner
Microsoft.DotNet.XHarness.TestRunners.XunitviaWasmTestRunner.LibraryTestsCoreCLRuses a slimmer runner project because the full XHarness runner had SDK deps that didn't fit CoreCLR wasm.corerun.wasm --library <TestAssembly>.dll(or an equivalent entry-point wrapper).4. P/Invoke surface expansion
PlatformNotSupportedExceptionshort-circuit.pal_wasi_missing.hand the WASI-side callhelpers will grow substantially.5. Test exclusions
[SkipOnPlatform(TestPlatforms.Wasi, …)]andIsWasiApplicable=falsegating for chunks that fundamentally don't fit WASI (threading, subprocess, listening sockets, dup,mmap, etc.).Task.Runcontinuations, and other CoreCLR-specific corners. Fresh triage sweep will be needed.6. CI wiring
eng/pipelines/common/templates/wasi-wasm-coreclr-library-tests.ymlmirroringwasm-coreclr-library-tests.yml.runtime.yml, wire helix queues inhelix-queues-setup.yml.System.Runtime.Tests+System.Collections.Tests) analogous toLibraryTests_Smoke_AOT.Suggested phasing
System.Runtime.Testsonly). Forces items 1 + 2 + 3 to be real. Rough estimate: ~1–2 weeks.LibraryTestsCoreCLRleg. Rough estimate: ~1–2 months, mostly items 4 + 5.Related: