lui
GPU-accelerated HTML/CSS renderer for Rust, built on wgpu.
lui is a complete HTML/CSS rendering engine that runs directly on the GPU via wgpu (Vulkan, Metal, DX12). It parses real HTML5, applies CSS styling (Flexbox + Grid), lays out page geometry, and renders through custom GPU pipelines — all from a single Rust binary. No web browser. No JavaScript. Ever.
Key Features
- GPU rendering via wgpu — Quad SDF pipeline, glyph atlas, and image pipeline all run on Vulkan/Metal/DX12
- CSS Flexbox & Grid — Complete CSS Flexbox Level 1 and CSS Grid with
frunits,minmax(),repeat(), and auto-placement - Full text shaping — cosmic-text (HarfBuzz-based) shaping with glyph atlas,
text-align,letter-spacing,text-transform, and text decorations - Form controls —
<input>(22 types),<textarea>,<button>with full text editing, caret, selection, and clipboard - No JavaScript needed — All logic is Rust. Callbacks are Rust closures. No
<script>execution, ever.
Architecture Pipeline
HTML/CSS string
│
▼ lui-parser Tokenizer + tree builder + CSS parser
Tree<Node<Element>>
│
▼ lui-style UA defaults + selector match + cascade + inheritance
CascadedTree<CascadedNode>
│
▼ lui-layout-old Block flow + Flex + Grid + Inline (IFC) + text shaping
LayoutBox tree
│
▼ lui (paint.rs) LayoutBox → DisplayList (quads + glyphs + clip ranges)
DisplayList
│
▼ lui-renderer Quad pipeline (SDF) + Glyph pipeline + scissor/clip
Frame on wgpu surface
First Steps
New to lui? Start with the Getting Started overview to understand what lui is, then follow the Quick Start guide to get your first window on screen.