01 / CLOSED WORLD
Unused means gone.
Only reachable code, data, generics, and imports survive. An unused package reference does not become deployment baggage.
Independent .NET. Built outside Microsoft.
Mono proved .NET could belong beyond one company. NetWasm brings that independent spirit to the Wasm era—compiling your reachable C# program into one standalone WebAssembly Component.
Live Playground · No account · Your browser does the compiling
C# 15 · 5 development hosts: Linux x64 and ARM64 · macOS ARM64 · Windows x64 and ARM64
FINAL COMPONENT
91,294
bytes
NO CLR.
NO MONO RUNTIME.
NO dotnet.js.
NO APP DLLs.
An independent .NET again
Mono is now part of Microsoft. NetWasm brings back an ambitious .NET implementation built independently, in public, by one developer: compiler, CoreLib, runtime, precise GC, SDK, WASI host, browser toolchain, libraries, and test integration. JetBrains gave Kotlin a portable Wasm platform. This is C#’s answer.
The runtime tax is optional
Roslyn produces CIL. NetWasm compiles the reachable program directly to Wasm, specializes its generics, and links only the runtime support it actually uses. The component is the program.
AOT without the traps
NetWasm works out what your program needs at compile time. JSON, Regex, dependency injection, and structured logging generate ordinary code the compiler can see—so your app does not break because somebody forgot a “do not trim this constructor” annotation three libraries away.
Try the generated-code examplesVISIBLE TO THE COMPILER
✓ Reachability decided at compile time
Smaller by design
NetWasm starts with a smaller platform contract: closed-world compilation, precise GC, and explicit host capabilities. It does not drag desktop assumptions into every deployment.
01 / CLOSED WORLD
Only reachable code, data, generics, and imports survive. An unused package reference does not become deployment baggage.
02 / C# 15
C# 15, generics, exceptions, async, managed memory, and precise garbage collection compile into the final artifact.
03 / WASI
Programs receive the clocks, HTTP, files, and host interfaces you choose—not ambient access to the machine.
04 / BOTH ADDRESS WIDTHS
Ship portable wasm32 WASI Preview 2 Components, or target raw wasm32 and wasm64 core modules for advanced hosts.
Not a toy compiler
Build, run, publish, test, and reuse focused libraries with the commands you already know.
dotnet build·dotnet run·dotnet publish·dotnet test
LINQ and Async LINQ, Memory, Pipelines, Web Encodings, HTTP, Regex, JSON, XML, Hashing, reflection-free dependency injection, Options, and structured logging.
Explore libraries ↗ TRun TUnit through ordinary dotnet test, with source-generated discovery and a NetWasm runner.
Edit C#, compile it locally, run the result, compare optimization settings, and download the component.
Try it now — no install ↗Local quickstart
Install .NET SDK 10.0.300 or newer, create an app, run it locally, and publish a standalone component. Use the .NET 11 SDK when your source uses C# 15.
Five supported development hosts: Linux x64, Linux ARM64, macOS ARM64, Windows x64, and Windows ARM64. NuGet downloads the pinned host tools on first restore and reuses them on later builds. No separate Emscripten, Node.js, Python, Git, LLVM, or Binaryen setup is needed.
Read the full quickstart ↗$ dotnet new install NetWasm.Templates
$ dotnet new netwasm-app -n HelloNetWasm
$ cd HelloNetWasm
$ dotnet run
42
$ dotnet publish -c Release -o publish/local
Stop reading. Compile something.
The Playground runs the compiler in your browser. Start with the C# 15 tour, then try JSON, Regex, dependency injection, generated logging, XML, HTTP, LINQ, hashing, or TUnit.
NetWasm is pre-1.0, so its API and ABI can evolve. The current profile deliberately excludes runtime reflection, dynamic, runtime assembly loading, managed threading, general managed file APIs, raw sockets, and subprocesses.