Introduction
Iced brings the Elm Architecture to Rust desktop development. It separates state, messages, and view logic into distinct functions, making UIs predictable and testable. The library renders via wgpu (GPU-accelerated) or a software fallback, producing crisp native-feeling applications on Windows, macOS, and Linux.
What Iced Does
- Renders GPU-accelerated UIs using wgpu with a software fallback
- Implements The Elm Architecture with typed messages and an update loop
- Provides built-in widgets: buttons, text inputs, sliders, scrollable lists, and more
- Supports async commands and subscriptions for background tasks
- Enables custom widget creation with a flexible rendering API
Architecture Overview
An Iced application is a loop: the runtime calls view() to build a virtual widget tree, diffs it against the previous frame, and applies minimal updates to the rendered output. User interactions generate Message values routed to update(), which mutates state and optionally returns a Command for async work. The renderer backends (wgpu, tiny-skia) are swappable.
Self-Hosting & Configuration
- Add
icedas a Cargo dependency; no system libraries required on most platforms - Enable feature flags for extras:
image,svg,canvas,tokio - On Linux, ensure Vulkan drivers are installed for GPU rendering or use the software renderer
- Customize themes via the
Themetrait or use built-in light/dark themes - Cross-compile with standard Rust toolchain targets
Key Features
- Type-safe message passing catches UI logic errors at compile time
- Responsive layout engine handles resizing without manual calculations
- Built-in async runtime integrates with Tokio for network and file I/O
- Canvas widget supports custom 2D drawing with paths, text, and images
- Accessibility support is actively developed with screen reader integration
Comparison with Similar Tools
- egui — egui uses immediate mode (redraw every frame); Iced uses retained mode with diffing for efficiency
- Slint — Slint has a declarative markup language; Iced is pure Rust code
- Tauri — Tauri uses web views for UI; Iced renders natively via GPU
- GTK-rs — GTK bindings wrap a C library; Iced is written entirely in Rust
- Druid — Druid is in maintenance mode; Iced is actively developed with a growing community
FAQ
Q: Does Iced support mobile platforms? A: Experimental support exists, but Iced primarily targets desktop (Windows, macOS, Linux) today.
Q: How does performance compare to native toolkits? A: GPU-accelerated rendering makes Iced competitive with native toolkits for most applications, including smooth animations.
Q: Can I use custom fonts and icons?
A: Yes. Load custom fonts via Font::with_bytes() and use SVG or image widgets for icons.
Q: Is Iced stable enough for production? A: The API is still evolving between minor versions, but several production applications use Iced successfully.