{"id":13395485,"url":"https://github.com/iced-rs/iced","last_synced_at":"2025-12-12T15:20:37.064Z","repository":{"id":37393445,"uuid":"197081291","full_name":"iced-rs/iced","owner":"iced-rs","description":"A cross-platform GUI library for Rust, inspired by Elm","archived":false,"fork":false,"pushed_at":"2025-05-12T17:09:26.000Z","size":19487,"stargazers_count":26524,"open_issues_count":412,"forks_count":1303,"subscribers_count":203,"default_branch":"master","last_synced_at":"2025-05-12T17:27:57.778Z","etag":null,"topics":["elm","graphics","gui","interface","renderer-agnostic","rust","toolkit","user-interface","widget","widgets"],"latest_commit_sha":null,"homepage":"https://iced.rs","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iced-rs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"hecrj","ko_fi":"hecrj_"}},"created_at":"2019-07-15T22:34:46.000Z","updated_at":"2025-05-12T17:09:30.000Z","dependencies_parsed_at":"2024-01-31T19:30:50.710Z","dependency_job_id":"d0450a2e-eceb-419f-a31e-fd30d9b84377","html_url":"https://github.com/iced-rs/iced","commit_stats":{"total_commits":4420,"total_committers":274,"mean_commits":"16.131386861313867","dds":"0.24660633484162897","last_synced_commit":"e722c4ee4f80833ba0b1013cadd546ebc3f490ce"},"previous_names":["hecrj/iced"],"tags_count":58,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iced-rs%2Ficed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iced-rs%2Ficed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iced-rs%2Ficed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iced-rs%2Ficed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iced-rs","download_url":"https://codeload.github.com/iced-rs/iced/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253789754,"owners_count":21964736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elm","graphics","gui","interface","renderer-agnostic","rust","toolkit","user-interface","widget","widgets"],"created_at":"2024-07-30T17:02:01.777Z","updated_at":"2025-12-12T15:20:37.059Z","avatar_url":"https://github.com/iced-rs.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"docs/logo.svg\" width=\"140px\" /\u003e\n\n# Iced\n\n[![Documentation](https://docs.rs/iced/badge.svg)][documentation]\n[![Crates.io](https://img.shields.io/crates/v/iced.svg)](https://crates.io/crates/iced)\n[![License](https://img.shields.io/crates/l/iced.svg)](https://github.com/iced-rs/iced/blob/master/LICENSE)\n[![Downloads](https://img.shields.io/crates/d/iced.svg)](https://crates.io/crates/iced)\n[![Test Status](https://img.shields.io/github/actions/workflow/status/iced-rs/iced/test.yml?branch=master\u0026event=push\u0026label=test)](https://github.com/iced-rs/iced/actions)\n[![Discourse](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdiscourse.iced.rs%2Fsite%2Fstatistics.json\u0026query=%24.users_count\u0026suffix=%20users\u0026label=discourse\u0026color=5e7ce2)](https://discourse.iced.rs/)\n[![Discord Server](https://img.shields.io/discord/628993209984614400?label=\u0026labelColor=6A7EC2\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8)](https://discord.gg/3xZJ65GAhd)\n\nA cross-platform GUI library for Rust focused on simplicity and type-safety.\nInspired by [Elm].\n\n\u003ca href=\"https://github.com/squidowl/halloy\"\u003e\n  \u003cimg src=\"https://iced.rs/showcase/halloy.gif\" width=\"460px\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/hecrj/icebreaker\"\u003e\n  \u003cimg src=\"https://iced.rs/showcase/icebreaker.gif\" width=\"360px\"\u003e\n\u003c/a\u003e\n\n\u003c/div\u003e\n\n## Features\n\n* Simple, easy-to-use, batteries-included API\n* Type-safe, reactive programming model\n* [Cross-platform support] (Windows, macOS, Linux, and the Web)\n* Responsive layout\n* Built-in widgets (including [text inputs], [scrollables], and more!)\n* Custom widget support (create your own!)\n* [Debug tooling with performance metrics and time traveling]\n* First-class support for async actions (use futures!)\n* Modular ecosystem split into reusable parts:\n  * A [renderer-agnostic native runtime] enabling integration with existing systems\n  * Two built-in renderers leveraging [`wgpu`] and [`tiny-skia`]\n    * [`iced_wgpu`] supporting Vulkan, Metal and DX12\n    * [`iced_tiny_skia`] offering a software alternative as a fallback\n  * A [windowing shell]\n\n__Iced is currently experimental software.__ [Take a look at the roadmap] and\n[check out the issues].\n\n[Cross-platform support]: https://raw.githubusercontent.com/iced-rs/iced/master/docs/images/todos_desktop.jpg\n[text inputs]: https://iced.rs/examples/text_input.mp4\n[scrollables]: https://iced.rs/examples/scrollable.mp4\n[Debug tooling with performance metrics and time traveling]: https://github.com/user-attachments/assets/2e49695c-0261-4b43-ac2e-8d7da5454c4b\n[renderer-agnostic native runtime]: runtime/\n[`wgpu`]: https://github.com/gfx-rs/wgpu\n[`tiny-skia`]: https://github.com/RazrFalcon/tiny-skia\n[`iced_wgpu`]: wgpu/\n[`iced_tiny_skia`]: tiny_skia/\n[windowing shell]: winit/\n[Take a look at the roadmap]: ROADMAP.md\n[check out the issues]: https://github.com/iced-rs/iced/issues\n\n## Overview\n\nInspired by [The Elm Architecture], Iced expects you to split user interfaces\ninto four different concepts:\n\n* __State__ — the state of your application\n* __Messages__ — user interactions or meaningful events that you care\n  about\n* __View logic__ — a way to display your __state__ as widgets that\n  may produce __messages__ on user interaction\n* __Update logic__ — a way to react to __messages__ and update your\n  __state__\n\nWe can build something to see how this works! Let's say we want a simple counter\nthat can be incremented and decremented using two buttons.\n\nWe start by modelling the __state__ of our application:\n\n```rust\n#[derive(Default)]\nstruct Counter {\n    value: i32,\n}\n```\n\nNext, we need to define the possible user interactions of our counter:\nthe button presses. These interactions are our __messages__:\n\n```rust\n#[derive(Debug, Clone, Copy)]\npub enum Message {\n    Increment,\n    Decrement,\n}\n```\n\nNow, let's show the actual counter by putting it all together in our\n__view logic__:\n\n```rust\nuse iced::widget::{button, column, text, Column};\n\nimpl Counter {\n    pub fn view(\u0026self) -\u003e Column\u003cMessage\u003e {\n        // We use a column: a simple vertical layout\n        column![\n            // The increment button. We tell it to produce an\n            // `Increment` message when pressed\n            button(\"+\").on_press(Message::Increment),\n\n            // We show the value of the counter here\n            text(self.value).size(50),\n\n            // The decrement button. We tell it to produce a\n            // `Decrement` message when pressed\n            button(\"-\").on_press(Message::Decrement),\n        ]\n    }\n}\n```\n\nFinally, we need to be able to react to any produced __messages__ and change our\n__state__ accordingly in our __update logic__:\n\n```rust\nimpl Counter {\n    // ...\n\n    pub fn update(\u0026mut self, message: Message) {\n        match message {\n            Message::Increment =\u003e {\n                self.value += 1;\n            }\n            Message::Decrement =\u003e {\n                self.value -= 1;\n            }\n        }\n    }\n}\n```\n\nAnd that's everything! We just wrote a whole user interface. Let's run it:\n\n```rust\nfn main() -\u003e iced::Result {\n    iced::run(Counter::update, Counter::view)\n}\n```\n\nIced will automatically:\n\n  1. Take the result of our __view logic__ and layout its widgets.\n  1. Process events from our system and produce __messages__ for our\n     __update logic__.\n  1. Draw the resulting user interface.\n\nRead the [book], the [documentation], and the [examples] to learn more!\n\n## Implementation details\n\nIced was originally born as an attempt at bringing the simplicity of [Elm] and\n[The Elm Architecture] into [Coffee], a 2D game library I am working on.\n\nThe core of the library was implemented during May 2019 in [this pull request].\n[The first alpha version] was eventually released as\n[a renderer-agnostic GUI library]. The library did not provide a renderer and\nimplemented the current [tour example] on top of [`ggez`], a game library.\n\nSince then, the focus has shifted towards providing a batteries-included,\nend-user-oriented GUI library, while keeping the ecosystem modular.\n\n[this pull request]: https://github.com/hecrj/coffee/pull/35\n[The first alpha version]: https://github.com/iced-rs/iced/tree/0.1.0-alpha\n[a renderer-agnostic GUI library]: https://www.reddit.com/r/rust/comments/czzjnv/iced_a_rendereragnostic_gui_library_focused_on/\n[tour example]: examples/README.md#tour\n[`ggez`]: https://github.com/ggez/ggez\n\n## Contributing / Feedback\n\nIf you want to contribute, please read our [contributing guidelines] for more details.\n\nFeedback is also welcome! You can create a new topic in [our Discourse forum] or\ncome chat to [our Discord server].\n\n## Sponsors\n\nThe development of Iced is sponsored by the [Cryptowatch] team at [Kraken.com]\n\n[book]: https://book.iced.rs/\n[documentation]: https://docs.rs/iced/\n[examples]: https://github.com/iced-rs/iced/tree/master/examples#examples\n[Coffee]: https://github.com/hecrj/coffee\n[Elm]: https://elm-lang.org/\n[The Elm Architecture]: https://guide.elm-lang.org/architecture/\n[the current issues]: https://github.com/iced-rs/iced/issues\n[contributing guidelines]: https://github.com/iced-rs/iced/blob/master/CONTRIBUTING.md\n[our Discourse forum]: https://discourse.iced.rs/\n[our Discord server]: https://discord.gg/3xZJ65GAhd\n[Cryptowatch]: https://cryptowat.ch/charts\n[Kraken.com]: https://kraken.com/\n","funding_links":["https://github.com/sponsors/hecrj","https://ko-fi.com/hecrj_"],"categories":["Rust","Libraries","库 Libraries","Framework","HarmonyOS","rust","Rust 程序设计","GUI","\u003ca name=\"Rust\"\u003e\u003c/a\u003eRust","虚拟化"],"sub_categories":["GUI","GUI GUI","Windows Manager","网络服务_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficed-rs%2Ficed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficed-rs%2Ficed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficed-rs%2Ficed/lists"}