Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
I

iced

> 编程语言
Open source

A cross-platform GUI library for Rust, inspired by Elm

31.1K stars0 likes1 views
WebsiteGitHub

About

A cross-platform GUI library for Rust, 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.

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:

…

Finally, we need to be able to react to any produced messages and change our state accordingly in our update logic:

rust
impl Counter {
    // ...

    pub fn update(&mut self, message: Message) {
        match message {
            Message::Increment => {
                self.value += 1;
            }
            Message::Decrement => {
                self.value -= 1;
            }
        }
    }
}

And that's everything! We just wrote a whole user interface. Let's run it:

rust
fn main() -> iced::Result {
    iced::run(Counter::update, Counter::view)
}

Iced will automatically:

  1. Take the result of our view logic and layout its widgets.
  2. Process events from our system and produce messages for our update logic.
  3. Draw the resulting user interface.

Read the book, the documentation, and the examples to learn more!

Implementation details

Iced was originally born as an attempt at bringing the simplicity of Elm and The Elm Architecture into Coffee, a 2D game library I am working on.

The core of the library was implemented during May 2019 in this pull request. The first alpha version was eventually released as a renderer-agnostic GUI library. The library did not provide a renderer and implemented the current tour example on top of ggez, a game library.

Since then, the focus has shifted towards providing a batteries-included, end-user-oriented GUI library, while keeping the ecosystem modular.

Contributing / Feedback

If you want to contribute, please read our contributing guidelines for more details.

Feedback is also welcome! You can create a new topic in our Zulip forum or come chat to our Discord server.

Sponsors

The development of Iced is sponsored by the Cryptowatch team at Kraken.com

Issues· 506 open

View all issuesOpen on GitHub
  • #2400

    Iced does not properly render Canvas with webgl backend

    bugUpdated Sep 28, 2026
  • #2978

    Multiple examples not working in 0.13 and master-branch on web

    bugUpdated Sep 27, 2026
  • #2546

    Different widget types do not agree on how to align to pixel grid

    bugUpdated Sep 26, 2026
  • #3488

    `keyed::Column` reuses incompatible widget state

    bugUpdated Sep 26, 2026
  • #355

    Project Showcase

    improvementhelp wantedUpdated Sep 22, 2026
  • #3483

    text editor panics on resize when caret is vertically outside visible bounds

    bugUpdated Sep 22, 2026
  • #2208

    Is Iced's button no support drag and drop

    bugUpdated Sep 21, 2026
  • #3481

    Rich text ignores .ellipsis()

    bugUpdated Sep 21, 2026
  • #2706

    Impossible to disable dynamic linking on musl target

    bugUpdated Sep 20, 2026
  • #3368

    Performance tiny_skia

    bugUpdated Sep 18, 2026

> Tags

Rustelmgraphicsguiinterface

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 30, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言