C# (experimental)
language="csharp" compiles C# 14 with the real Roslyn compiler
and runs it on the .NET WebAssembly runtime, in a Web Worker. The first Run
downloads about 14 MB compressed (40 MB once unpacked);
later runs use Cache Storage. Each Run starts fresh, which took about a second on a laptop.
Hello
Reading stdin
Input is prefilled: edit the stdin box before pressing Run. The program sees the end of input after the last line.
A practice problem
A compiler error
Stop a runaway loop
Limits
- Threads and blocking on an unfinished task throw
PlatformNotSupportedException.awaitworks. - Input must be prefilled. Tasks still pending when Main returns are ended with the worker.
- A project is up to 32
.csfiles and 2 MB, and a program with hundreds of methods takes several seconds to compile. - Works in Chrome on an iPhone, with no timings measured. Android and Safari on a phone are untested.
An independent project, not affiliated with or endorsed by Microsoft.