# iced-rs/iced architecture

> Architecture diagram of the GitHub repository iced-rs/iced, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/iced-rs/iced
- Repository: https://github.com/iced-rs/iced

## Overview

Iced is a cross-platform Rust GUI library centered on an Elm-style application loop: application state produces a widget view, user/system events become messages, and update logic changes state or schedules async work. The runtime and windowing shell coordinate interfaces and events; renderer abstractions feed either GPU or software drawing. The README documents this user-facing flow and major capabilities. Some internal subsystem links are omitted where only directory structure, rather than call evidence, was available.

Main entry points: [`widget/src/lib.rs`](https://github.com/iced-rs/iced/blob/master/widget/src/lib.rs) (Built-in Widgets), [`src/application.rs`](https://github.com/iced-rs/iced/blob/master/src/application.rs) (Application API), [`wgpu/src/engine.rs`](https://github.com/iced-rs/iced/blob/master/wgpu/src/engine.rs) (GPU Engine), [`runtime/src/lib.rs`](https://github.com/iced-rs/iced/blob/master/runtime/src/lib.rs) (GUI Runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application API"]
  node_app["Application API<br/>[application.rs]"]
  node_hot["Hot Reload<br/>[hot.rs]"]
end

subgraph group_runtime["Runtime and UI"]
  node_widgets["Built-in Widgets<br/>[lib.rs]"]
  node_pane_grid["Pane Grid<br/>[pane_grid.rs]"]
  node_pick_list["Pick List<br/>[pick_list.rs]"]
  node_scrollable["Scrollable<br/>[scrollable.rs]"]
  node_shader["Shader Widget<br/>[shader.rs]"]
  node_core["Core Types<br/>[lib.rs]"]
  node_runtime_engine["GUI Runtime<br/>[lib.rs]"]
  node_async["Async Tasks<br/>[lib.rs]"]
end

subgraph group_rendering["Rendering"]
  node_renderer["Renderer Abstraction<br/>[lib.rs]"]
  node_graphics["Graphics Abstractions<br/>[lib.rs]"]
  node_wgpu_engine["GPU Engine<br/>[engine.rs]"]
  node_wgpu_primitives["GPU Primitives<br/>[primitive.rs]"]
  node_wgpu_quads["GPU Quads<br/>[quad.rs]"]
  node_wgpu_text["GPU Text<br/>[text.rs]"]
  node_wgpu_triangles["GPU Triangles<br/>[triangle.rs]"]
  node_wgpu_nudge["GPU Pixel Alignment<br/>[nudge.rs]"]
  node_software_engine["Software Engine<br/>[engine.rs]"]
  node_software_raster["Software Raster<br/>[raster.rs]"]
  node_software_text["Software Text<br/>[text.rs]"]
  node_software_vector["Software Vector<br/>[vector.rs]"]
end

subgraph group_windowing["Windowing and tools"]
  node_window_shell["Window Shell<br/>[lib.rs]"]
  node_conversion["Event Conversion<br/>[conversion.rs]"]
  node_devtools["Debug Tooling<br/>[lib.rs]"]
end

node_user(("User"))

node_user -->|"defines state and logic"| node_app
node_app -->|"builds view"| node_widgets
node_widgets -->|"produces messages"| node_app
node_app -.->|"runs application"| node_runtime_engine
node_runtime_engine -->|"uses foundations"| node_core
node_runtime_engine -.->|"supports async work"| node_async
node_runtime_engine -.->|"runs in shell"| node_window_shell
node_window_shell -->|"uses conversions"| node_conversion
node_widgets -->|"includes"| node_pane_grid
node_widgets -->|"includes"| node_pick_list
node_widgets -->|"includes"| node_scrollable
node_widgets -->|"includes"| node_shader
node_renderer -.->|"uses abstractions"| node_graphics
node_wgpu_engine -->|"dispatches primitives"| node_wgpu_primitives
node_wgpu_engine -->|"dispatches quads"| node_wgpu_quads
node_wgpu_engine -->|"dispatches text"| node_wgpu_text
node_wgpu_engine -->|"dispatches triangles"| node_wgpu_triangles
node_wgpu_text -->|"uses alignment"| node_wgpu_nudge
node_software_engine -->|"uses raster"| node_software_raster
node_software_engine -->|"uses text"| node_software_text
node_software_engine -->|"uses vector"| node_software_vector
node_app -->|"references reload"| node_hot
node_app -.->|"optional instrumentation"| node_devtools
node_renderer -.->|"offers GPU renderer"| node_wgpu_engine
node_renderer -.->|"offers software renderer"| node_software_engine

click node_app "https://github.com/iced-rs/iced/blob/master/src/application.rs"
click node_hot "https://github.com/iced-rs/iced/blob/master/src/hot.rs"
click node_widgets "https://github.com/iced-rs/iced/blob/master/widget/src/lib.rs"
click node_pane_grid "https://github.com/iced-rs/iced/blob/master/widget/src/pane_grid.rs"
click node_pick_list "https://github.com/iced-rs/iced/blob/master/widget/src/pick_list.rs"
click node_scrollable "https://github.com/iced-rs/iced/blob/master/widget/src/scrollable.rs"
click node_shader "https://github.com/iced-rs/iced/blob/master/widget/src/shader.rs"
click node_core "https://github.com/iced-rs/iced/blob/master/core/src/lib.rs"
click node_runtime_engine "https://github.com/iced-rs/iced/blob/master/runtime/src/lib.rs"
click node_async "https://github.com/iced-rs/iced/blob/master/futures/src/lib.rs"
click node_renderer "https://github.com/iced-rs/iced/blob/master/renderer/src/lib.rs"
click node_graphics "https://github.com/iced-rs/iced/blob/master/graphics/src/lib.rs"
click node_wgpu_engine "https://github.com/iced-rs/iced/blob/master/wgpu/src/engine.rs"
click node_wgpu_primitives "https://github.com/iced-rs/iced/blob/master/wgpu/src/primitive.rs"
click node_wgpu_quads "https://github.com/iced-rs/iced/blob/master/wgpu/src/quad.rs"
click node_wgpu_text "https://github.com/iced-rs/iced/blob/master/wgpu/src/text.rs"
click node_wgpu_triangles "https://github.com/iced-rs/iced/blob/master/wgpu/src/triangle.rs"
click node_wgpu_nudge "https://github.com/iced-rs/iced/blob/master/wgpu/src/nudge.rs"
click node_software_engine "https://github.com/iced-rs/iced/blob/master/tiny_skia/src/engine.rs"
click node_software_raster "https://github.com/iced-rs/iced/blob/master/tiny_skia/src/raster.rs"
click node_software_text "https://github.com/iced-rs/iced/blob/master/tiny_skia/src/text.rs"
click node_software_vector "https://github.com/iced-rs/iced/blob/master/tiny_skia/src/vector.rs"
click node_window_shell "https://github.com/iced-rs/iced/blob/master/winit/src/lib.rs"
click node_conversion "https://github.com/iced-rs/iced/blob/master/winit/src/conversion.rs"
click node_devtools "https://github.com/iced-rs/iced/blob/master/devtools/src/lib.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_hot,node_user toneBlue
class node_widgets,node_pane_grid,node_pick_list,node_scrollable,node_shader,node_core,node_runtime_engine,node_async toneAmber
class node_renderer,node_graphics,node_wgpu_engine,node_wgpu_primitives,node_wgpu_quads,node_wgpu_text,node_wgpu_triangles,node_wgpu_nudge,node_software_engine,node_software_raster,node_software_text,node_software_vector toneMint
class node_window_shell,node_conversion,node_devtools toneRose
```

## Components

### Application API

- [Application API](https://github.com/iced-rs/iced/blob/master/src/application.rs): `src/application.rs`
- [Hot Reload](https://github.com/iced-rs/iced/blob/master/src/hot.rs): `src/hot.rs`

### Runtime and UI

- [Built-in Widgets](https://github.com/iced-rs/iced/blob/master/widget/src/lib.rs): `widget/src/lib.rs`
- [Pane Grid](https://github.com/iced-rs/iced/blob/master/widget/src/pane_grid.rs): `widget/src/pane_grid.rs`
- [Pick List](https://github.com/iced-rs/iced/blob/master/widget/src/pick_list.rs): `widget/src/pick_list.rs`
- [Scrollable](https://github.com/iced-rs/iced/blob/master/widget/src/scrollable.rs): `widget/src/scrollable.rs`
- [Shader Widget](https://github.com/iced-rs/iced/blob/master/widget/src/shader.rs): `widget/src/shader.rs`
- [Core Types](https://github.com/iced-rs/iced/blob/master/core/src/lib.rs): `core/src/lib.rs`
- [GUI Runtime](https://github.com/iced-rs/iced/blob/master/runtime/src/lib.rs): `runtime/src/lib.rs`
- [Async Tasks](https://github.com/iced-rs/iced/blob/master/futures/src/lib.rs): `futures/src/lib.rs`

### Rendering

- [Renderer Abstraction](https://github.com/iced-rs/iced/blob/master/renderer/src/lib.rs): `renderer/src/lib.rs`
- [Graphics Abstractions](https://github.com/iced-rs/iced/blob/master/graphics/src/lib.rs): `graphics/src/lib.rs`
- [GPU Engine](https://github.com/iced-rs/iced/blob/master/wgpu/src/engine.rs): `wgpu/src/engine.rs`
- [GPU Primitives](https://github.com/iced-rs/iced/blob/master/wgpu/src/primitive.rs): `wgpu/src/primitive.rs`
- [GPU Quads](https://github.com/iced-rs/iced/blob/master/wgpu/src/quad.rs): `wgpu/src/quad.rs`
- [GPU Text](https://github.com/iced-rs/iced/blob/master/wgpu/src/text.rs): `wgpu/src/text.rs`
- [GPU Triangles](https://github.com/iced-rs/iced/blob/master/wgpu/src/triangle.rs): `wgpu/src/triangle.rs`
- [GPU Pixel Alignment](https://github.com/iced-rs/iced/blob/master/wgpu/src/nudge.rs): `wgpu/src/nudge.rs`
- [Software Engine](https://github.com/iced-rs/iced/blob/master/tiny_skia/src/engine.rs): `tiny_skia/src/engine.rs`
- [Software Raster](https://github.com/iced-rs/iced/blob/master/tiny_skia/src/raster.rs): `tiny_skia/src/raster.rs`
- [Software Text](https://github.com/iced-rs/iced/blob/master/tiny_skia/src/text.rs): `tiny_skia/src/text.rs`
- [Software Vector](https://github.com/iced-rs/iced/blob/master/tiny_skia/src/vector.rs): `tiny_skia/src/vector.rs`

### Windowing and tools

- [Window Shell](https://github.com/iced-rs/iced/blob/master/winit/src/lib.rs): `winit/src/lib.rs`
- [Event Conversion](https://github.com/iced-rs/iced/blob/master/winit/src/conversion.rs): `winit/src/conversion.rs`
- [Debug Tooling](https://github.com/iced-rs/iced/blob/master/devtools/src/lib.rs): `devtools/src/lib.rs`

### Other components

- **User**

## Connections

- User → Application API: defines state and logic
- Application API → Built-in Widgets: builds view
- Built-in Widgets → Application API: produces messages
- Application API → GUI Runtime: runs application
- GUI Runtime → Core Types: uses foundations (evidence: `runtime/src/lib.rs`)
- GUI Runtime → Async Tasks: supports async work
- GUI Runtime → Window Shell: runs in shell
- Window Shell → Event Conversion: uses conversions (evidence: `winit/src/lib.rs`)
- Built-in Widgets → Pane Grid: includes (evidence: `widget/src/lib.rs`)
- Built-in Widgets → Pick List: includes (evidence: `widget/src/lib.rs`)
- Built-in Widgets → Scrollable: includes (evidence: `widget/src/lib.rs`)
- Built-in Widgets → Shader Widget: includes (evidence: `widget/src/lib.rs`)
- Renderer Abstraction → Graphics Abstractions: uses abstractions
- GPU Engine → GPU Primitives: dispatches primitives (evidence: `wgpu/src/engine.rs`)
- GPU Engine → GPU Quads: dispatches quads (evidence: `wgpu/src/engine.rs`)
- GPU Engine → GPU Text: dispatches text (evidence: `wgpu/src/engine.rs`)
- GPU Engine → GPU Triangles: dispatches triangles (evidence: `wgpu/src/engine.rs`)
- GPU Text → GPU Pixel Alignment: uses alignment (evidence: `wgpu/src/text.rs`)
- Software Engine → Software Raster: uses raster (evidence: `tiny_skia/src/engine.rs`)
- Software Engine → Software Text: uses text (evidence: `tiny_skia/src/engine.rs`)
- Software Engine → Software Vector: uses vector (evidence: `tiny_skia/src/engine.rs`)
- Application API → Hot Reload: references reload (evidence: `src/application.rs`)
- Application API → Debug Tooling: optional instrumentation
- Renderer Abstraction → GPU Engine: offers GPU renderer
- Renderer Abstraction → Software Engine: offers software renderer
