Prerequisites
Before installing Iced, ensure you have:- Rust 1.92 or later - Install from rustup.rs
- Cargo - Comes with Rust installation
- A code editor with Rust support (VS Code with rust-analyzer recommended)
Iced requires Rust edition 2024, which is available in Rust 1.92+. Make sure your toolchain is up to date with
rustup update.Basic Installation
Add Iced to yourCargo.toml:
Cargo.toml
wgpu- GPU-accelerated renderer (Vulkan, Metal, DX12, OpenGL, WebGPU)tiny-skia- Software renderer as fallbackcrisp- Pixel snapping for sharp edgeshinting- Text rendering hintsweb-colors- Web-compatible color blendingthread-pool- Default futures executorlinux-theme-detection- System theme detection on Linuxx11andwayland- Linux display server backends
Choosing an Executor
Iced requires a futures executor to handle asynchronous operations. Choose one:Renderer Configuration
Iced supports multiple rendering backends. Choose based on your needs:GPU-Accelerated (wgpu)
Recommended for most applications. Provides hardware acceleration via Vulkan, Metal, or DirectX:Cargo.toml
Software Renderer (tiny-skia)
For systems without GPU support or when a pure software fallback is needed:Cargo.toml
Both Renderers
The default configuration includes both for maximum compatibility:Cargo.toml
Feature Flags
Enable additional widgets and capabilities as needed:Widget Features
Cargo.toml
The
image feature includes default codecs (PNG, JPEG, etc.). Use image-without-codecs if you want to provide your own codec selection for a smaller binary size.Development Features
Cargo.toml
Advanced Features
Cargo.toml
Platform-Specific Configuration
Web (WASM)
For web targets, use the WebGL backend and appropriate features:Cargo.toml
fira-sans feature embeds the Fira Sans font, which is useful for WASM builds where system fonts aren’t available.
Linux Display Servers
Cargo.toml
Minimal Configuration
For the smallest binary size, disable default features and enable only what you need:Cargo.toml
Full Featured Configuration
For maximum functionality, enable all features:Cargo.toml
Verification
Verify your installation by running:Quick Start
Build your first Iced application
