Menu

Compiling F# Directly to WebAssembly GC Without the .NET Runtime
📰

Compiling F# Directly to WebAssembly GC Without the .NET Runtime

DEV Community: dotnet·Sascha Dewad·8 days ago
#skYrtd0Q
#devtodotnet#devto#dev#fsharp#wasm
Long article (907 words) — no AI summary yet.
Reading 0:00
15s threshold

How fsharp-wasm turns F# into 4–45 KB WasmGC modules—and what we built across 19 open-source repositories.

For years, running F# in the browser or on edge platforms has come with a familiar trade-off: you ship the entire .NET runtime alongside your code. Solutions like Blazor and Uno are capable, but they carry multi-megabyte payloads and noticeable startup overhead—both of which hurt when you are targeting fast web apps or resource-constrained edge isolates.

With modern WebAssembly features now standardized across major engines—specifically WasmGC , Tail Calls , Exception Handling , and JS String Builtins —compilers for functional languages no longer need to bundle their own garbage collector or linear-memory runtime.

Over the past months, I have been building fsharp-wasm , an experimental open-source compiler and ecosystem (licensed under Apache-2.0) that compiles F# directly into WasmGC binaries without the .NET runtime or Base Class Library (BCL).

Live Demos & Benchmarks:…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.