# Rust Desktop UI Framework Selection and Interface Design

Select a GUI framework for Rust desktop applications, design or refine real interfaces, and validate their runtime performance. This includes evaluating frameworks like GPUI Kit, egui, Slint, Iced, and Tauri, as well as designing features such as tray icons, history records, and dark mode.

**Canonical URL:** https://skillshunter.net/skills/discovered-56a336868d77d857558df8948141dccc530508a637b413bf

**JSON URL:** https://skillshunter.net/api/public/v1/skills/discovered-56a336868d77d857558df8948141dccc530508a637b413bf

**Markdown URL:** https://skillshunter.net/skills/discovered-56a336868d77d857558df8948141dccc530508a637b413bf.md

**Instructions download URL:** https://skillshunter.net/skills/discovered-56a336868d77d857558df8948141dccc530508a637b413bf/download

**Category:** Software & Development

**Source URL:** https://github.com/suiren0219/ui-skills/blob/667948be054f8dc3d7de5f963f383a5c8e483fb5/rust-desktop-ui/SKILL.md

**Source commit:** 667948be054f8dc3d7de5f963f383a5c8e483fb5

**Listing approved at:** 2026-11-29

**Created at:** 2026-11-28T18:57:07.000000Z

**Updated at:** 2026-11-29T10:53:53.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Before starting, check the project's `Cargo.toml`, event loop, existing theme, window lifecycle, and packaging targets. If a framework is already in use, prioritize localized improvements unless it explicitly hinders the requirements. Ensure that the selected framework aligns with the project's needs and that the event loop and dependencies are compatible with the target platform.

### When to use it

- Evaluate and select a GUI framework for a Rust desktop application based on project requirements
- Design and implement tray icons and system tray integration for a Rust desktop application
- Implement and refine history record features with search and filtering capabilities
- Design and implement dark/light mode support with system theme fallback
- Validate the runtime performance of a Rust desktop application's UI, including window scaling and input handling

## Skill instructions

---
name: rust-desktop-ui
description: 为 Rust 桌面应用选择 GUI 框架、设计或打磨真实界面并验证运行效果。用户提到 Rust GUI、GPUI Kit、Slint、egui、Iced、Tauri、Windows 托盘、桌面历史记录、深色模式，或想在 GitHub 找适合 Rust 的 UI 时使用。不是 Rust 桌面项目、也没有 Rust 选型需求时不触发。
---

# Rust 桌面界面

先看项目的 `Cargo.toml`、事件循环、现有主题、窗口生命周期和打包目标。已用某个框架时优先做局部改进，除非它明确阻碍需求。用户只要求调研或界面优化，不因此迁移程序、改写业务逻辑或更换正式入口。

## 框架选型

用 GitHub CLI 核对仓库、README、许可证和 release；版本、最低 Rust 版本和 Windows 后端以目标 release 为准。不要按 Star 排名，也不要把仓库的通用许可证标记当作完整授权条款。

| 适合什么 | 首选候选与代价 |
|---|---|
| 多页、虚拟表格、可搜索历史、Markdown 与复杂主题 | [GPUI Kit](https://github.com/longbridge/gpui-kit)。先试 Windows 构建、中文输入、渲染依赖及托盘事件接入；核对组件、文档和依赖的许可证。 |
| 既有 egui 工程、紧凑面板和调试工具 | [egui/eframe](https://github.com/emilk/egui)，可搭配 `egui_extras` 表格；检查文本选择、CJK 字形和 IME，别仅凭英文样例。 |
| 声明式布局、想把界面文件与 Rust 分开 | [Slint](https://github.com/slint-ui/slint)。检查拟用的开源、免版税或商业许可条款及大表格需求。 |
| 多状态页面、偏好消息驱动架构 | [Iced](https://github.com/iced-rs/iced)。检查所选后端，以及键盘、虚拟列表和富文本是否需要自建。 |
| 已有 Web UI，或对富文本、前端生态、Web 技术栈有明确需求 | [Tauri](https://github.com/tauri-apps/tauri)。确认 Windows WebView2 分发、维护成本和前端与 Rust 的权限边界；不是纯 Rust UI。 |

Windows 托盘可评估 [`tray-icon`](https://github.com/tauri-apps/tray-icon) 或现有 Win32 实现。先核对 UI 框架的事件循环要求；不要为了换图标重写托盘线程。通常给出一个推荐和一个更轻的备选，并说明用哪个最小原型来验证，而不是一次引入多个框架。

## 桌面界面和托盘

- **历史记录**：列表默认最新优先，清楚显示时间、题目、结果、耗时。提供搜索和状态筛选；详情可选中、复制，能看原文、参考结果及失败或重试原因。按实际数据格式只读加载，处理旧记录、未完成行与重复数据；刷新不跳走正在看的详情。不要把网络失败记成答错。为暂无记录、筛选无匹配和文件读取失败给不同提示。
- **主题与排版**：用成组令牌控制页面、面板、文字、边框、选择、焦点和状态。默认跟随系统，按项目需求支持手动切换。检查标题栏、弹出菜单、滚动条、焦点与禁用状态。正文用高对比中性色，绿／红／琥珀只作辅助，状态必须有文字。不强行把已有项目换成另一种设计语言。
- **图标与菜单**：先满足小尺寸辨识度，做 16、20、24、32 px 等尺寸和透明边缘；高 DPI 下检查清晰度。避免用颜色作为唯一状态线索，悬停有描述。查看、运行控制、退出分组，不可用项禁用。区分关闭窗口、停止后台任务与退出；检验重复启动、恢复窗口、资源清理及 Explorer 重启后的恢复策略。
- **部署与并行**：先检查正式实例是否正在运行。用独立测试实例、临时输出目录和本地数据验证，不抢占正式互斥锁，也不擅自停止用户任务。保留历史、账号和配置，迁移时先验证兼容，不对正式目录套用原型。

## 交付验证

最少验证构建、真实窗口启动、分栏最小宽度、常用 Windows 缩放、日夜主题、中文输入或显示、键盘操作，以及实际托盘注册、状态更新、菜单路由和退出清理。程序化按钮调用不等于人工点击；截图不证明功能；GitHub 文档不证明本项目能构建。最后分别报告写盘、新进程加载、运行验证、哪些还要重启或补测。涉及视觉 UI 实作时遵守工作区已经启用的设计与桌面验证技能。

