Run C# natively in the browser through the web assembly via mono-wasm

Empower you frontend applications with C# — Mono Wasm

WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable target for compilation of high-level languages like C/C++/Rust, enabling deployment on the web for client and server applications.

— https://webassembly.org/

We all heard about WASM, capabilities, and possibilities. Other languages and runtimes such as Rust have their official way to run their code in the browser and for .NET, the only official way is to use Blazor which is a front-end framework.

Blazor is good, but it’s a complete package for developing the whole frontend application. What if I like to use .NET libraries inside my old JS application that is already in production?

Almost 2 years ago I read an article on the Mono website about mono-wasm. They showed a great possibility of what they had accomplished.

One of the first examples of mono and web assembly

Almost two weeks ago, I had an internal speech about WebAssembly in LINKIT. I wanted to show people how they can run their code inside the browser without Blazor, so I asked people like Steve Sanderson, Miguel de Icaza, and Scott Hanselman.

After an hour I was able to compile and run .NET inside the browser. Since the process is not officially documented, I decided to write an article about it.