A full Swift pipeline — Lexer · Parser · Sema · IR · WASM — wired to the complete SwiftUI runtime: 52 views, 75 modifiers, real @State, sheets, alerts, Path drawing — rendered to canvas through an identity-aware diff engine that surgically swaps only the subtrees that change. Foundation along for the ride. Metal shaders for the GPU too. All from scratch in C — no Apple runtime, no LLVM, no React, no shim.
Plain Swift source — including @State, NavigationStack, Toggle, Path, the works. Hit a tab and our in-browser compiler tokenises, parses, type-checks, and lowers to UIIR — then the canvas renderer paints it onto a real iPhone frame. Tap a button → @State mutates → an identity-aware diff engine rebuilds only the affected subtree. No iframe, no JS shim, no native runtime — just Swift → C compiler → WASM → canvas pixels. The same pipeline you'd ship to a phone, running in your tab.
Our compiler. Our UIIR. Our renderer. Our diff engine. All under one roof in 71K lines of C — no React, no Web Components, no proprietary runtime. The same pipeline you'd target a phone with, just landing on a canvas instead of CoreAnimation. Open the full playground →
Because once you have your own compiler infrastructure, why stop at Swift? libMetal tokenises Apple MSL, lowers to MIR, emits WGSL — WebGPU paints the fragment. Edit the shader, move the mouse, watch it react. Same C-only philosophy: no LLVM, no third-party transpiler.
The 177 KB libMetal WASM tokenises ~106 keywords, lowers to MIR with 90+ builtin rewrites, then emits WGSL plus a JSON pipeline-metadata sidecar — the same library you'd link against in C.
Edit in the playground →
Edit, hit ▶ Run — compiler runs in your tab.
Press Run or Cmd+Enter...
Open full playground for live diagnostics and hover tooltips.
Structs, classes, enums, protocols, generics, closures, async/await, error handling, pattern matching — all compiled to WebAssembly.
Array, Dictionary, Set, String (Unicode 17.0), Optional, Result, Range — 290 runtime functions with 180+ inlined method handlers.
Date / Calendar arithmetic + formatting, URL components & resolution, JSON encode/decode, UUID, UserDefaults, Unicode tables — 70+ runtime functions exposed via a JS bridge.
Compile MSL (Metal Shading Language) to WGSL right in the browser. vec3 / mat4 math, mesh primitives (cube · sphere · plane · grid), camera + location passthrough — runs on WebGPU.
Direct IR-to-WASM compilation. No LLVM, no clang, no Binaryen. Structured control flow, dead code elimination, constant folding.
Modular design: compiler core knows zero about stdlib. Modules register type declarations, IR handlers, and WASM builtins via plugin API.
The whole declarative UI surface — 52 views, 75 modifiers, sheets, alerts, gestures, Path & Canvas drawing — rendered to canvas via our own UIIR JSON. Identity-aware diff engine surgically rebuilds just the affected subtree on every @State mutation. Same Swift code you'd ship to a phone, no edits.
Comprehensive test suite covering collections, concurrency, generics, error handling, strings, numerics. Zero regressions policy.