Blog

OpenSwiftUI Project

  • OS: WASI

From WASI portability to an OpenSwiftUI Web renderer

OpenSwiftUI's shared display list now feeds a browser-owned Canvas 2D renderer, with color and styled text reaching the Web.

OpenSwiftUI first used wasm32-wasi as a portability check. The August 2026 experiment goes further: Swift performs graph evaluation, layout, and display-list generation, while a JavaScriptKit adapter draws the supported commands into Canvas 2D. The demo now covers color, Text, and TextStyle.

Current scope

The renderer redraws the full canvas and supports only a small command set. Images, arbitrary paths, animation, interaction, incremental updates, accessibility, and browser lifecycle integration are not implemented.

The useful result is the boundary: portable Swift exports render commands, and the browser adapter owns DOM and Canvas APIs. It is an architecture proof, not a finished Web backend.

OpenSwiftUI Web running in Chrome with styled text rendered on a black canvas
OpenSwiftUI Web running through WASI and CanvasRenderer after Text and TextStyle support landed.