October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Redmond desk5 min

While Microsoft Is Busy Learning Rust, I’m Rebuilding .NET for WASI

NetWasm is an independent CIL-to-WebAssembly compiler with its own CoreLib and runtime, targeting WASI Preview 2. Here is what it supports, where it stops, and how to test it.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

NetWasm is an independent, early-stage project by Zion Sati that compiles the CIL produced from C# into a WebAssembly component targeting WASI Preview 2, using its own CoreLib and runtime. Its headline measurement is an 88,419-byte uncompressed component for a clean Release build of Console.WriteLine(42);. That is one self-reported result for one small program, not a size promise for .NET applications in general.

The Microsoft and Rust framing in the title is tongue-in-cheek. NetWasm is not a Microsoft project and is not presented as a replacement for anything Microsoft has announced. Sati’s September 23, 2026 DEV Community article describes it as his own work with a similarly broad ambition: a runtime built around what a program actually uses.

As an Amazon Associate I earn from qualifying purchases.

What NetWasm does

NetWasm sits between the C# compiler and WebAssembly. According to Sati, Roslyn compiles C# into CIL, and NetWasm then follows the code reachable from the program and compiles that CIL to WebAssembly. It does not translate C# into C++. It supplies a separate CoreLib and runtime and includes only the parts the program requires.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The author states that the finished application does not need CoreCLR, Mono, dotnet.js, or a folder of managed application DLLs alongside it. These are the author’s descriptions of the design. They have not been independently audited.

The 88,419-byte measurement, and what it does and does not show

The article reports an 88,419-byte uncompressed output for a clean Release build of Console.WriteLine(42);, targeting WASI Preview 2. According to Sati, that file contains the program, the required CoreLib and runtime pieces, and what he describes as a precise Boehm garbage collector.

Three conditions limit how far the number can be read:

  • It is a single trivial program, built in Release mode, and measured by the author.
  • It is uncompressed. Compressed sizes were not reported in the article.
  • The author explicitly says this one measurement does not imply that every C# application will be this size. A program that pulls in more of the library surface will be larger.

No comparison with other .NET-to-WebAssembly toolchains, and no benchmark of runtime speed, appears in the article.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A closed-world design

NetWasm does not start from a conventional .NET runtime and trim it. It starts from a small runtime and a defined supported surface, and adds features on request. Several design choices follow from that approach:

  • No runtime reflection and no runtime type-name catalog. The compiler must know at build time what the program uses.
  • No dynamic. Sati lists dynamic and reflection as design non-goals, not as missing features that will arrive later.
  • Opt-in extras. Time-zone data is opt-in. Source-generated JSON is described as a pay-for-use option, meaning it adds size only when a program uses it.

Code that depends on reflection-driven serialization, dynamic dispatch through dynamic, or runtime type discovery sits outside this design and should be treated as unsupported.

What works and what does not, as of the September 2026 article

Sati calls NetWasm early and says it has a known bug list. The unsupported areas named in the article are:

  • Expression trees
  • Managed threading
  • General managed File, FileStream, and Directory APIs
  • Raw sockets

The article also describes selected ported libraries for LINQ, HTTP JSON, configuration, options, dependency injection, and caching. It says TUnit tests run through dotnet test. Because these lists come from the author at a point in time, check the project’s current support inventory before relying on any specific library.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A usable subset of C# is not the same as broad compatibility. The article does not establish that F#, VB.NET, or arbitrary NuGet packages work. Assume they do not until the project documents otherwise.

The WASI target

WASI is the interface through which a WebAssembly program receives capabilities such as files, clocks, and network access from its host. The WebAssembly/WASI project describes WASI 0.2 as a modular set of APIs defined with WIT and the WebAssembly Component Model. It describes WASI 0.3 as building on 0.2 by adding native asynchronous functionality through future and stream types.

The Rust Project’s wasm32-wasip2 target documentation describes Preview 2 as relying on the Component Model for interoperability through higher-level, shared-nothing APIs. It calls Preview 2 an “island of stability” while noting that WASI remains under active development.

NetWasm names Preview 2 as its main target. The article does not claim Preview 3 support, and readers should not infer it from the existence of the 0.3 specification. Runtime support also varies by host. The author says a published component can be run directly with Wasmtime if Wasmtime is installed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Trying it, according to the author

The article’s sequence assumes the .NET SDK is installed. Run the steps in order:

  1. Install the templates: dotnet new install NetWasm.Templates
  2. Create a project: dotnet new with the NetWasm template, producing a folder named netwasm-app, then change into it.
  3. Restore dependencies: dotnet restore
  4. Run the program to check the build and output.
  5. Publish in Release mode: dotnet publish -c Release
  6. Optional: run the published component directly with Wasmtime, if it is installed.

For a quick test without installing anything locally, the author provides a browser playground. Sati says compilation there runs locally in the browser. Check the project README before following these steps, since template names and commands can change between releases.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Evaluating NetWasm against your workload

Because the article provides no controlled benchmark across projects, the useful comparison is against your own program. The table below lists the decision points and what the article establishes for each.

Decision point What the September 2026 article states What to verify
Language and library surface Subset of C# with listed ported libraries; known bugs Every API your program calls, against the current inventory
Reflection and dynamic Not supported; described as design non-goals Whether your code, or a dependency, uses either at runtime
Filesystem, networking, threading General managed file APIs, raw sockets, and managed threading are unsupported Whether your workload needs any of them, including indirectly
Output size 88,419 bytes uncompressed for Console.WriteLine(42); only Build your own program in Release mode and measure it
WASI version Preview 2 is the main target; Preview 3 not claimed Your host runtime’s WASI support
Tooling SDK templates, dotnet test for TUnit, browser playground Current template names and commands in the README
License Compiler and tooling under the NetWasm Community License; CoreLib, runtime, templates, and ported libraries under MIT The license files in the current repository

Licensing

Sati describes a split license. The compiler and tooling are source available under the NetWasm Community License. CoreLib, the runtime, the templates, and the ported libraries are MIT licensed. Anyone planning reuse or redistribution should read the license files in the repository directly, because the summary in a blog article can fall out of date.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Context: the Copilot claim in the article

Sati’s piece relays a claim from Stephen Toub’s account that GitHub Copilot’s agent runtime migration produced more than 800,000 lines of production Rust, with AI agents writing most of the code. This is a second-hand figure, presented in the article as context. It is not verified here and should not be cited as a checked Microsoft statistic.

The Bottom Line

NetWasm is a credible early experiment for small, closed-world C# programs that target WASI Preview 2 and stay inside its documented surface. It is not a general .NET-on-WASI replacement, and anyone with reflection, threading, networking, or broad NuGet dependencies should test their own workload before committing.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.