+14
日增长
+144
周增长
+313
月增长
32,044
stars
1,740
forks
219
watchers
1,781
prs
1,377
issues
18
releases
README
Iced
![Documentation][documentation]
A cross-platform GUI library for Rust focused on simplicity and type-safety.
Inspired by [Elm].
Features
Simple, easy-to-use, batteries-included API
Type-safe, reactive programming model
[Cross-platform support] (Windows, macOS, Linux, and the Web)
Responsive layout
Built-in widgets (including [text inputs], [scrollables], and more!)
Custom widget support (create your own!)
[Debug tooling with performance metrics and time traveling]
First-class support for async actions (use futures!)
Modular ecosystem split into reusable parts:
A [renderer-agnostic native runtime] enabling integration with existing systems
Two built-in renderers leveraging [wgpu] and [tiny-skia]
[iced_wgpu] supporting Vulkan, Metal and DX12
[iced_tiny_skia] offering a software alternative as a fallback
A [windowing shell]
__Iced is currently experimental software.__ [Take a look at the roadmap] and
[check out the issues].
[Cross-platform support]: https://raw.githubusercontent.com/iced-rs/iced/master/docs/images/todos_desktop.jpg
[text inputs]: https://iced.rs/examples/text_input.mp4
[scrollables]: https://iced.rs/examples/scrollable.mp4
[Debug tooling with performance metrics and time traveling]: https://github.com/user-attachments/assets/2e49695c-0261-4b43-ac2e-8d7da5454c4b
[renderer-agnostic native runtime]: runtime/
[wgpu]: https://github.com/gfx-rs/wgpu
[tiny-skia]: https://github.com/RazrFalcon/tiny-skia
[iced_wgpu]: wgpu/
[iced_tiny_skia]: tiny_skia/
[windowing shell]: winit/
[Take a look at the roadmap]: ROADMAP.md
[check out the issues]: https://github.com/iced-rs/iced/issues
Overview
Inspired by [The Elm Architecture], Iced expects you to split user interfaces
into four different concepts:
__State__ — the state of your application
__Messages__ — user interactions or meaningful events that you care
about
__View logic__ — a way to display your __state__ as widgets that
may produce __messages__ on user interaction
__Update logic__ — a way to react to __messages__ and update your
__state__
We can build something to see how this works! Let's say we want a simple counter
that can be incremented and decremented using two buttons.
We start by modelling the __state__ of our application:
rust
[derive(Default)]
struct Counter {
value: i32,
}
Next, we need to define the possible user interactions of our counter:
the button presses. These interactions are our __messages__:
rust
[derive(Debug, Clone, Copy)]
pub enum Message {
Increment,
Decrement,
}
Now, let's show the actual counter by putting it all together in our
__view logic__:
rust
use iced::widget::{button, column, text, Widget};
impl Counter {
pub fn view(&self) - impl Widget {
// We use a column: a simple vertical layout
column![
// The increment button. We tell it to produce an
// Increment message when pressed
button("+").on_press(Message::InTop issues
#355Project Showcase79 comments · 2020-05-23#302Mobile support43 comments · 2020-04-18#1232Running example on WSL: Error: GraphicsAdapterNotFound31 comments · 2022-02-06#1022System themes30 comments · 2021-09-03#552Implement accessibility support26 comments · 2020-10-05#2525Window transparency does not work under Windows25 comments · 2024-07-27#1618Immediate crash on Winit wayland backend and wgpu Vulkan renderer19 comments · 2022-12-23#36Text Selection19 comments · 2019-10-31
Discussions
#2052New Discourse forum2 comments · 2023-08-26#2051Scrollable should allow specifying a min height(width) "size" for the scroller so it doesn't shrink extremely small with large content.0 comments · 2023-08-25#2050Organization of various states in the program1 comments · 2023-08-25#2045Why did `iced` trigger events like `on_clicked` at `ButtonPressed` rather than `ButtonReleased`1 comments · 2023-08-20#2043Perceptual gradient instead of linear3 comments · 2023-08-19#2037How would I make hexagonal widgets?1 comments · 2023-08-17#2036Can I change window class?1 comments · 2023-08-17#2033[feat] API on `settings::Window` to configure enabled buttons via `winit::WindowBuilder:: set_enabled_buttons`1 comments · 2023-08-16
Latest release
0.14.0 0.14.0 2025-12-07Added - Reactive rendering. 2662 - Time travel debugging. 2910 - Animation API for application code. 2757 - Headless mode testing. 2698 - First-class end-to-end testing. 3059 - Input method support. 2777 - Hot reloading. 3000 - Concurrent image decoding and uploading (and more cool stuff). 3092 - comet debugger and devtools foundations. 2879 - Presentation metrics for comet. 2881 - Custom performance metrics for comet. 2891 - Smart scrollbars. 2922 - System theme reactions. 3051 - table widget. 3018 - grid widget. 2885 - sensor widget. 2751 - float widget and other cool stuff.