Write F#.
Run in WebAssembly.

Compact modules, no garbage collector and no runtime library to ship, in the browser and on the edge.

F# code compiling to WebAssembly in a terminal
Built on Fable · WasmGC MVP Compliant · Apache-2.0 Licensed · Actively Developed

Why FSharp WasmGC?

F# semantics, natively in WebAssembly

A compiler backend that maps F# constructs directly to WebAssembly GC types — no boxing hacks, and the engine's own garbage collector instead of one in the binary.

Nothing to ship but your code

WasmGC output uses the engine's garbage collector, so no GC or runtime sits inside the binary: whole demo applications are 6–172 KB. What a module touches outside itself — the DOM, the network, storage — comes through imports that a small host provides.

Full F# Semantics

Pattern matching, discriminated unions, closures, tail calls — all compile correctly to native WasmGC constructs without compromise.

WasmGC-Native Types

F# records map to struct types. F# lists become linked structs. Closures become typed function references. Clean mapping, no overhead.

Fable Foundation

Built on a fork of Fable's F# parser and type-checker (MIT). The code generation back end, the base library and the hosts are ours.

Component Model Ready

Automatic WIT export generation. Compile F# to WasmGC components and link them at the Wasm level — no JS glue needed between modules.

Apache-2.0 Licensed & Open Source

Fully open. Community-driven development. Every sprint is documented in detail. Contributions welcome from day one.

The platform

One language, from the compiler to the edge

The compiler is the flagship, and what is built on it is the proof: libraries, a canvas graphics stack, a widget editor, a newsletter designer, server modules and the host that runs them. What works, what grows and what is only planned is written on each card.

The compiler

fsharp-wasm, fsharp and Fable — F# in, WebAssembly GC out. Everything else is built to prove it and to use it.

Base libraries and tests

fsharp-wasm-core, fsharp-wasmecto — The lowest layer: everything above uses it, it uses nothing of ours.

Graphics and text

fsharp-wasm-graphics, fsharp-glyph-aura — Drawing, laying out, picking and typesetting, in F#, for a canvas and for a screen reader.

The browser

fsharp-wasm-runtime — The runtime that runs a module in a page, and the pages that show what it does.

Editors and applications

fsharp-wasm-ide, fsharp-wasm-newsletter — Programs that make the stack show what it can do. They are gates too: a program that stops compiling is a finding for the compiler.

Server and edge

fsharp-wasm-backend, fsharp-wasm-edge — The same language on the server: a module, a small host, one adapter per platform.

What comes next

fsharp-wasm-accounting, A data science library, WIT with Rust libraries — Plans, in the order we expect to need them. Nothing here works yet, and the cards say so.

From F# to WebAssembly in four steps

Step 1: Get the compiler

Download a release (a self-contained binary with the F# base library beside it) or build from source. A .NET 10 SDK has to be on the PATH.

Step 2: Write idiomatic F#

Create an .fsproj and write standard F#. No special attributes or interop layer needed for core functionality.

Step 3: Compile to WasmGC

Run the compiler. Get a .wasm binary and a human-readable .wat text representation you can inspect and debug.

Step 4: Deploy anywhere

Run it in a browser, Node, Deno or Bun, or on Cloudflare, Vercel and Netlify: hosts for those exist (see the demos and the backend page). Any WasmGC-capable runtime works.

Diagram showing the F# to WasmGC compilation pipeline

Under the hood

Clean architecture, inspectable output

Fable front end + WasmGC code generation

A fork of Fable provides the F# AST and the type information. FSharp WasmGC replaces the code generation back end.

Human-readable WAT intermediate format

The compiler emits WebAssembly Text Format (WAT) before assembling. You can inspect exactly what Wasm your F# produces.

Multi-file .fsproj project support

Compile entire projects with multiple F# source files and a growing Base Class Library (BCL) implemented in WasmGC itself.

First-class Wasm Component Model

Automatic WIT interface generation

WIT files are generated from your module's exports. Today that covers primitive types; strings and records need adapters in the module, which is the next step on the roadmap.

wasm-tools integration

When wasm-tools is available, WasmGC components are assembled automatically. Link multiple F# modules at the Wasm level.

Cross-module FFI via [<Import>] attribute

Import functions from other Wasm components using F#'s [] attribute — the same pattern as Fable.

Solid foundation, proven results

Counted in a recorded run on 2026-11-16 and counted again on 2026-11-22 for what changed since (QuickTest, String ABI, Host (graphics), Widgets, Interact, the widget editor, the newsletter designer, the libraries of the core, the backend and the edge): every suite, demo and benchmark is listed on the Tests, Demos and Benchmarks pages.

2 083
named tests and checks
12
live demos in your browser
13
benchmark kernels, F# against JavaScript
Apache-2.0
License

Benchmarks — measured and public

Thirteen kernels in F# and in JavaScript, the size of every module and the time to download and compile it — and a server module against hand-written JavaScript and Hono on Node, Bun and workerd, where it is close on a small answer and far behind on a long one, with the profile of why. The method, the raw reports and what is not measured yet are with the numbers.

From the blog

View all posts »

Deep dives, release notes, and tutorials on F# compiler internals, WasmGC design, and functional programming for the web platform.

Build the future of F# on the web

FSharp WasmGC is open source and actively developed. Contributions, issues, and discussions are all welcome on GitHub.