Will CoreCLR Support WebAssembly? #84230
-
I have spent most of today reading up on dotnet and wasm, and I fully appreciate this is all very new and emerging... But, I would love to know what issues/projects to track to stay up to date and what the near future plans are in this area. For example there was talk of adding this support in dotnet/corert#4659 but the trail goes cold when the repo was archived. Is there any ongoing work in coreclr or has the decision been made to invest in mono as a wasm runtime instead? Can some will fill me in or tell me where to look for the latest story in this area? Apologies if this is not the right place to ask. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The main runtime for Webassembly now is mono. It supports interpreted mode, AOT, and some kind of "Jiterpreter" (hybrid interpreter that can optimize hot paths using jit compilation) but maybe this is runtimelab only thing. Also, in runtimelab there is an ongoing work to support LLVM as AOT compiler to wasm. Note that Blazor wasm is already a thing. Also there is official wasm sdk coming in.Net 8. One latest prototype project to mention is .Net isolator which was shoecased by @SteveSandersonMS not long ago. It supports seamlessly hosting wasmtime runtime inside a .Net host to achieve true isolation of potentially malicious code but with some performance trade-offs. As for CoreCLR itself - I don't know. Maybe someone with more knowledge can give you specific answer about this. |
Beta Was this translation helpful? Give feedback.
-
It was actually that very video that started me off looking into this. Thank you @SteveSandersonMS for that one you've got me hooked at this point. I've just now been reading through some comments from https://github.com/SteveSandersonMS/dotnet-wasi-sdk/issues which has helped clarify things. @En3Tho you mention an official wasm SDK is coming in .net 8. Do you have a link to a project or pr about it? I haven't been able to find it myself. I'd like to learn more and follow along. |
Beta Was this translation helpful? Give feedback.
The main runtime for Webassembly now is mono. It supports interpreted mode, AOT, and some kind of "Jiterpreter" (hybrid interpreter that can optimize hot paths using jit compilation) but maybe this is runtimelab only thing. Also, in runtimelab there is an ongoing work to support LLVM as AOT compiler to wasm.
Note that Blazor wasm is already a thing. Also there is official wasm sdk coming in.Net 8. One latest prototype project to mention is .Net isolator which was shoecased by @SteveSandersonMS not long ago. It supports seamlessly hosting wasmtime runtime inside a .Net host to achieve true isolation of potentially malicious code but with some performance trade-offs.
As for CoreCLR itself -…