C# running in your browser.

MiniSharp compiles a focused, tested C# subset straight to WebAssembly. The compiler itself is loaded as WASM, so editing, diagnostics, build, run, and export happen in the tab. No server compile, no .NET SDK, no Roslyn, no LLVM.

Documented support Async / Task + VFS seeds Download generated .wasm
minisharp.run/studio
1234567891011121314
using System;using System.Threading.Tasks;class Program { static Task<int> DoubleLater(int x) { return RunAsync(x); } static async Task<int> RunAsync(int x) { await Task.Delay(1); return x * 2; } static void Main() { var result = DoubleLater(21).Result; Console.WriteLine(result); }}
OUTPUT — minisharp run
$ minisharp run › C# → resolver → IR → WASM › Task.Delay scheduled on host event loop 42 exit 0 · 38 ms

Measured support, not a framework clone.

documented support no LLVM · no Roslyn client-side compile C# → IR → WASM Task.Delay seed standalone .wasm
gated
documented support surface
4209
latest documented mcs pass count
1057
latest documented honest success cases
1.1M
browser compiler WASM bundle
What works today

A practical C# to WASM workbench, scoped to documented support.

MiniSharp is not CoreCLR in a tab. It is a from-scratch compiler/runtime with named smoke gates for the parts it claims.

Direct compiler pipeline

C# source goes through MiniSharp parsing, resolver/type binding, IR, and direct WebAssembly emission. No JavaScript C# semantics.

Studio build and run

Write multi-file C# projects, build in the browser, run the generated module, inspect diagnostics, and download the produced .wasm.

Core language seeds

Classes, methods, fields, locals, control flow, constructors, interfaces, generics, delegates/events, exceptions, lambdas, and extensions have focused runtime coverage.

CoreLib slice

Object, string, one-dimensional arrays, primitive parse/to-string paths, basic math/convert calls, and packed scalar nullable seeds are documented in CoreLib v1.

Collections and LINQ seeds

Heap-backed List<T> and Dictionary<string,T> paths cover demo-ready mutators, foreach, and selected LINQ operators.

Async and host interop seeds

Completed tasks, Task.Delay, supported suspended async Task shapes, VFS file APIs, and explicit host text adapters are covered by smoke tests.

Support snapshot

What MiniSharp claims, what is seeded, and what is still open.

The public promise is intentionally narrower than the full C# and .NET surface. Rows move only when there is a named regression gate behind them.

Supported

smoke gated
  • In-browser C# compile, diagnostics, run, console output, and generated WASM download.
  • Basic classes, methods, fields, locals, loops, conditionals, arrays, strings, and primitive operations used by the release hardening suite.
  • Multi-file Studio project model, diagnostic source mapping, offline cache seed, debug bundle, and worker probe/control contract.

Seeded

focused subset
  • Generic methods/classes for common value/reference slots, interface dispatch, delegates/events, typed catch/finally, and object/struct local capture.
  • List and Dictionary paths for int/string values, selected LINQ operators, scalar nullable, string helpers, and one-dimensional array helpers.
  • Task/Task<T>, pending Task.Delay, continuation queue metadata, supported suspended async state machines, VFS File/Directory, Path.Combine, and explicit host text adapters.

Still open

not promised
  • Full C# language compatibility, full BCL, CoreCLR/Mono parity, reflection, culture/globalization, and complete CLR exception object behavior.
  • Arbitrary async branch/goto shapes, byref locals, full struct/byref ABI, arbitrary awaiter scheduler/context dispatch, and full cancellation parity.
  • Project-folder OPFS workspace, full System.IO.Path semantics, live breakpoint debugger parity, and the desktop UI editor experience for public 0.1.0.
The compiler, end to end

From .cs to .wasm — every stage hand-written.

.cs
C# source
Lexer
tokens
Parser
AST
Sema
types · binding
IR
SSA-style
WASM
codegen
.wasm
download & run
No LLVM. No Roslyn. No .NET SDK. No third-party deps — and the compiler that does all of this is itself WASM.
Questions

The honest details.

Does my code go to a server to compile?
No. The MiniSharp compiler is itself compiled to WebAssembly and loaded into your tab. Lexing, parsing, semantic analysis, IR and WASM codegen all happen on your machine. Nothing is uploaded — close the tab and it's gone.
What do I need to install?
A browser. No .NET SDK, no Visual Studio, no Node. You can optionally install Studio as a PWA so it lives in your dock and works fully offline.
Does it use LLVM, Roslyn, or any .NET internals?
No. MiniSharp is written from scratch. The backend emits WebAssembly directly from MiniSharp IR, and the browser worker only provides explicit host services such as console output, timers, and text-file adapters.
How much of C# does it support?
The support snapshot covers the smoke-gated subset: core classes/methods/control flow, selected generics and interfaces, collections/LINQ seeds, CoreLib slices, and supported async/Task shapes. It is not full C# language compatibility and not the full .NET BCL.
Can I use the .wasm it produces elsewhere?
Yes, within the runtime imports your program needs. Console output, timer scheduling, task resume hooks, and explicit host adapters are part of the documented ABI; unsupported platform APIs are not silently emulated.
What happens when I use unsupported APIs?
The goal is an honest diagnostic or a documented seed limitation, not fake green support. Invalid ranges and some partial runtime paths may still trap at the WASM level until full CLR exception parity lands.

Open Studio. Try the supported C# to WASM path.

Write C#, run it in the browser, inspect the output, and export the generated module when the documented subset fits your program.