Photon

A rendering engine written in Zig. Custom HTML, CSS, layout, and paint — no WebView, no Blink, no WebKit.

VS Code rendered by Photon with syntax-highlighted TypeScript code

VS Code's workbench rendered entirely by Photon's pipeline — titlebar, tabs, line numbers, syntax highlighting, status bar.

The pipeline

HTML CSS Style Layout Display List Paint

Layout engine

Block, inline, flexbox, grid, absolute and fixed positioning. Box-sizing, margin collapsing, per-side borders.

CSS resolver

Selectors, specificity, cascade, inheritance, custom properties with var() resolution, viewport units.

Text rendering

HarfBuzz + FreeType for cross-platform text shaping. @font-face support, codicon icon fonts, glyph atlas caching.

JavaScript

JavaScriptCore integration with DOM stubs. VS Code's 35MB bundle loads, evaluates, and produces DOM output.

Software renderer

Display list with fill rects, text drawing, clipping, and alpha compositing. PPM/PNG image output for testing.

Written in Zig

Zero-cost C interop, no GC, comptime generics, cross-compilation. The entire pipeline from HTML to pixels.