Rust · 2026

Viewport

A Wayland compositor in Rust on Smithay whose entire shell — wallpaper, dock, window frames and titlebars — is a web page, composited zero-copy alongside native clients. Five interchangeable engine backends render that same page: WPE, WebKitGTK, Chromium, CEF and Servo.

View source

Viewport desktop shell showing its keyboard controls

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.
  • An engine backend renders the HTML shell to DMA-BUFs that become compositor render elements.
  • Tiling is a tree of CSS flexboxes, so the browser computes every window rectangle and the shell only measures the result.

Highlights

  • Five interchangeable engine backends behind one shell page — WPE, WebKitGTK, Chromium, CEF and Servo
  • Zero-copy from engine to screen: DMA-BUF frames, drm_syncobj fences and real vblank pacing
  • A Nix flake that builds WPE WebKit from source

Technology

Rust · wayland · smithay · wpe-webkit

← All selected work

Need something like this?

Let’s scope it.

Custom websites and Telegram bots, scoped per project and quoted by email.

See servicesGet in touch