Move WASM to CoreCLR to unlock more platfroms? #132280
Replies: 3 comments
|
In .NET 11, you can use |
|
wasm on coreclr is still WIP. As announced before it won't come together with mobile platforms in .NET 11. The current ETA is .NET 12. |
|
There are two separate things being conflated here, and untangling them explains both the error and why the suggested fix won't help. Runtime flavor and runtime pack are different things. (For what it's worth, @huoyaoyuan is right on the status: CoreCLR-on-wasm is in progress in-tree but is not a .NET 11 deliverable.)
The plumbing you'd actually want is The constraints on Workers are the harder part. Even with a working WASI host: no threads, 128 MB memory, 64 MiB worker size, and a 1 second startup-time budget. Those are real obstacles for a full framework, not paperwork. The useful precedent is Python Workers, which runs FastAPI today. That didn't happen by fixing a runtime pack — Cloudflare embedded Pyodide into So: this isn't blocked on Mono vs. CoreCLR. It's blocked on a WASI hosting story plus a Cloudflare-side integration. Note This reply was drafted with the assistance of GitHub Copilot. |
Uh oh!
There was an error while loading. Please reload this page.
Cloudflare Workers is a hugely popular serverless platform that supports WebAssembly. Today, you can use it to run Hono for path-based request routing, and even execute Rust code compiled to Wasm via the wasm32-unknown-unknown toolchain.
Currently, the only way to run a .NET application on Cloudflare is through containers, which are expensive. If ASP.NET Core could run in Wasm, we could deploy it to Cloudflare Workers without needing a container at all.
However, in .NET 11 Preview 7, attempting to compile an ASP.NET Core Minimal API project for WASM produces the following error: NETSDK1082: There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.
I guess thet is because WASM is using mono, not CoreCLR. Starting .NET 11, WASM is only Microsft supported platform using mono (Unity is not supported by Microsoft and is will be supported s∞n in Unity 6.6(preview)/6.7).
I guess this is because the Wasm runtime uses Mono, not CoreCLR. Starting with .NET 11, Wasm is the only Microsoft-supported platform still running on Mono. (Unity is not supported by Microsoft directly, and it will add .NET support s∞n in Unity 6.6 (preview) or 6.7).
All reactions