HeadlinesBriefing favicon HeadlinesBriefing.com

Rust's New Experimental UI Frameworks Xilem and Masonry

Hacker News •
×

Xilem and Masonry are experimental Rust UI frameworks offering native GUI development alternatives. Xilem provides a high-level, React/SwiftUI-inspired reactive architecture for building lightweight view trees, while Masonry acts as a foundational toolkit for constructing such frameworks. Both leverage winit for window creation, Vello and wgpu for 2D graphics, and Parley for text rendering. The projects include examples like a todo MVC app and a chess game, accessible via `cargo run --example`.

Prerequisites involve installing pkg-config, clang, and specific Wayland/X11/Vulkan libraries, with detailed setup instructions for Fedora, Debian, and Ubuntu. The repositories contain Nix flakes for development, though their correctness isn't routinely validated. A key distinction: Xilem is a UI framework, whereas Masonry is a toolkit for building UI frameworks, including Xilem itself.

The projects target Rust 1.92+ and include a split-debuginfo cargo config to manage dependency sizes. Contributions are welcome via pull requests on the Linebender Zulip channel, adhering to the Apache 2.0 license. While examples are provided, users should consult `ARCHITECTURE.md` for repository structure details.