codebam

Rust · 2026

Viewport

A Wayland compositor whose entire shell — wallpaper, dock, window frames — is a web page, composited zero-copy alongside native clients. Smithay drives DRM/KMS and input; WPE WebKit renders the UI straight to a DMA-BUF, so no pixel ever touches the CPU.

View source

The problem

Build a native Wayland compositor while letting ordinary web technology own the desktop shell and window layout, without copying rendered frames through the CPU.

Architecture

  • Smithay handles DRM/KMS, input and the xdg-shell protocol.
  • WPE WebKit renders the HTML shell to DMA-BUFs that become compositor render elements.
  • JavaScript measures CSS layout and sends window rectangles back to the compositor over IPC.

Highlights

  • Zero-copy composition for the web shell and native Wayland clients
  • CSS flexbox-based tiling rather than a second layout engine in Rust
  • Explicit synchronization and output frame pacing

Technology

Rust · wayland · smithay · wpe-webkit

← All selected work