Skip to content
Back to search

gpui-kit

Rust GUI components for building fantastic cross-platform desktop application by using GPUI.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/longbridge/gpui-kit with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/longbridge/gpui-kit'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/longbridge--gpui-kit/badge.svg)](/listings/longbridge--gpui-kit)

HTML

<a href="/listings/longbridge--gpui-kit"><img src="/api/listings/longbridge--gpui-kit/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 269 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <p align="center">
  2. <img src="https://raw.githubusercontent.com/longbridge/gpui-kit/main/website/public/logo.svg" width="112" alt="GPUI Kit logo" />
  3. <br>
  4. <strong>GPUI Kit</strong>
  5. </p>
  6. [English](./README.md) | [简体中文](./README.zh-CN.md)
  7. [![Build Status](https://github.com/longbridge/gpui-kit/actions/workflows/ci.yml/badge.svg)](https://github.com/longbridge/gpui-kit/actions/workflows/ci.yml) [![Docs](https://docs.rs/gpui-kit/badge.svg)](https://docs.rs/gpui-kit/) [![Crates.io](https://img.shields.io/crates/v/gpui-kit.svg)](https://crates.io/crates/gpui-kit)
  8. Build fantastic, high-performance desktop apps with Rust and GPUI.
  9. GPUI Kit is a comprehensive Rust desktop application framework. It combines a
  10. production-ready UI system with application-grade data, layout, and editing
  11. capabilities, all built on a reusable foundation of behavior, state, and
  12. infrastructure. GPUI Kit ships 75+ documented components and primitives,
  13. WebAssembly support, AccessKit accessibility, UI integration testing, and an
  14. optional JavaScript extension runtime.
  15. Documentation: <https://gpui-kit.com>
  16. ```text
  17. gpui-kit The one crate applications depend on
  18. ├── gpui-base Unstyled behavior, state, and infrastructure
  19. └── gpui-component GPUI Component: the complete styled UI system
  20. ```
  21. `gpui-kit` pins the matching GPUI release and re-exports GPUI, base, component,
  22. and assets, so a Rust application lists a single dependency. JavaScript extension
  23. hosts add `gpui-shell` separately; its default `components` feature supplies the styled catalog.
  24. See the [executable application recipe and AI-assisted development acceptance checks](examples/ai_recipes/README.md) for a tested starting point and verification commands.
  25. ## Features
  26. - **75+ Components and Primitives**: Forms, navigation, overlays, data display, editing, feedback, and layout, with polished interactions and productive defaults.
  27. - **Production Ready**: Used to build Longbridge Pro from day one and continuously refined in a publicly shipped commercial desktop application.
  28. - **WebAssembly**: Run applications and the same component showcases on the web with `wasm32-unknown-unknown`.
  29. - **Accessibility**: AccessKit roles, names, states, relationships, and actions are built into the interaction layer and covered by tests.
  30. - **UI Integration Testing**: Render real components in headless windows, drive pointer and keyboard input, and assert state, focus, layout, and accessibility.
  31. - **Native Feel**: Modern controls inspired by macOS and Windows, backed by semantic themes and multiple sizes.
  32. - **120 FPS**: GPU-accelerated interfaces that remain smooth under load.
  33. - **Data Tables**: Virtual scrolling, fixed and resizable columns, sorting, and cell selection across hundreds of thousands of rows.
  34. - **Virtual Lists**: Render only the visible range, including lists whose items have different sizes.
  35. - **Code Editor**: Stable performance at 200K lines with Tree-sitter highlighting and LSP diagnostics, completion, and hover.
  36. - **Dock Layout**: Resizable panels, draggable tabs, nested splits, and edge docks — all serializable.
  37. - **Rich Content**: Native Markdown and HTML rendering, syntax highlighting, and built-in charts.
  38. - **Design Freedom**: Use the complete visual system or build your own on the behavior and infrastructure in `gpui-base`.
  39. - **JavaScript Extensions**: `gpui-shell` lets a shipped Rust host load panels and business logic as scripts, with every capability granted explicitly.
  40. - **Cross Platform**: Ship one Rust codebase to macOS, Windows, and Linux.
  41. ## Framework Architecture
  42. ### Three layers. One ecosystem.
  43. Use `gpui-component` to keep the application coherent with one complete visual
  44. and interaction system. Use `gpui-base` when your product needs to create and
  45. own that system itself. Use `gpui-shell` when the application should be
  46. extensible in JavaScript after it ships.
  47. | **`gpui-component`** | **`gpui-base`** | **`gpui-shell`** |
  48. | -------------------------------- | --------------------------------------------- | ------------------------------------------ |
  49. | Complete, styled components | Unstyled behavior and infrastructure | JavaScript runtime hosted by Rust |
  50. | Productive defaults with theming | Full control over structure and visual design | Capabilities granted one at a time |
  51. | Best for building applications | Best for building design systems | Best for plugins and scripted applications |
  52. ```text
  53. APPLICATION
  54. │
  55. ┌───────────────────┼───────────────────┐
  56. │ │ │
  57. ▼ ▼ ▼
  58. ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
  59. │ gpui-component │ │ Your Design │ │ gpui-shell │
  60. │ Styled UI │ │ System │ │ JS extensions │
  61. └────────┬─────────┘ └────────┬─────────┘ └────────┬─────────┘
  62. │ │ │
  63. └────────────────────┼────────────────────┘
  64. ▼
  65. ┌──────────────────┐
  66. │ gpui-base │
  67. │ Behavior · State │
  68. │ Infrastructure │
  69. └────────┬─────────┘
  70. ▼
  71. GPUI
  72. ```
  73. > **Behavior belongs to the foundation. Presentation belongs to the application.**
  74. Use **`gpui-component`** when you want polished controls ready to ship. Build on
  75. **`gpui-base`** when your application should own its component source, layout,
  76. styling, and motion while reusing difficult interaction behavior. Add
  77. **`gpui-shell`** when contributors should extend the product without a fork or
  78. a release.
  79. The layering follows the same separation that makes the
  80. [shadcn](https://ui.shadcn.com) ecosystem flexible:
  81. | GPUI Kit ecosystem | Web ecosystem |
  82. | ------------------------------------ | ------------------------------- |
  83. | GPUI | HTML + Tailwind CSS |
  84. | [`gpui-base`](crates/base/README.md) | [Base UI](https://base-ui.com) |
  85. | `gpui-component` | shadcn's styled component layer |
  86. [Explore the architecture →](docs/ARCHITECTURE.md)
  87. ## Showcase
  88. GPUI Kit has powered [Longbridge Pro](https://longbridge.com/desktop)
  89. from day one. The framework is extracted from the demands of a publicly shipped
  90. commercial desktop application rather than designed in isolation.
  91. > **GPUI provides the rendering foundation. Longbridge provides the production foundation.**
  92. <img width="1763" alt="Image" src="https://github.com/user-attachments/assets/e1ecb9c3-2dd3-431e-bd97-5a819c30e551" />
  93. ## Usage
  94. ```toml
  95. [dependencies]
  96. gpui-kit = "0.7"
  97. ```
  98. `gpui-kit` always brings in GPUI and `gpui-base`; `gpui-component` and the
  99. default icon set are on by default. Turn default
  100. features off to keep only the layers you use. The `gpui-component` features (`inspector`, `decimal`,
  101. `tree-sitter`, and each `tree-sitter-<language>`) are available under the same
  102. names.
  103. ### GPUI Fast
  104. Enable the optional `gpui-fast` feature to select [GPUI Fast](https://github.com/longbridge/gpui-fast)
  105. for the core, native platforms, WebAssembly, and every enabled Kit layer:
  106. ```toml
  107. [dependencies]
  108. gpui-kit = { version = "0.7", features = ["gpui-fast"] }
  109. ```
  110. Keep the same imports, initialization, and test macros; no application `[patch]`
  111. or crate alias is needed. The default backend remains the pinned upstream GPUI
  112. snapshot. Cargo features are additive, so upstream packages still compile when
  113. Fast is selected. See [Getting Started](https://gpui-kit.com/docs/getting-started)
  114. for feature combinations and comparison commands.
  115. ### Basic Example
  116. ```rs
  117. use gpui_kit::component::button::*;
  118. use gpui_kit::component::*;
  119. use gpui_kit::component::label::Label;
  120. use gpui_kit::*;
  121. pub struct HelloWorld;
  122. impl Render for HelloWorld {
  123. fn render(&mut self, _: &mut Window, _: &mut Context<Self>) -> impl IntoElement {
  124. div()
  125. .v_flex()
  126. .gap_2()
  127. .size_full()
  128. .items_center()
  129. .justify_center()
  130. .child(Label::new("Hello, World!"))
  131. .child(
  132. Button::new("ok")
  133. .primary()
  134. .label("Let's Go!")
  135. .on_click(|_, _, _| println!("Clicked!")),
  136. )
  137. }
  138. }
  139. fn main() {
  140. gpui_kit::application().run(move |cx| {
  141. // This must be called before using any GPUI Component features.
  142. gpui_kit::init(cx);
  143. gpui_kit::open_window(WindowOptions::default(), cx, |_, cx| {
  144. cx.new(|_| HelloWorld)
  145. })
  146. .expect("Failed to open window");
  147. });
  148. }
  149. ```
  150. `gpui_kit::open_window` is the application window entry point and always mounts a Base `Root`. Component initialization registers styled window facilities; Cargo features do not select a different root type.
  151. ### Icons
  152. The default `assets` feature bundles the [Lucide](https://lucide.dev) icon set
  153. as `gpui-kit-assets`; pass it to the application with
  154. `gpui_kit::application().with_assets(gpui_kit::assets::Assets)`. To ship your
  155. own icons instead, leave that feature out and name the SVG files as defined in
  156. [IconName](https://github.com/longbridge/gpui-kit/blob/main/crates/component/src/icon.rs#L86).
  157. ## Skills for AI Coding Agents
  158. Install the GPUI Kit skills for your AI coding agent (Cursor, Claude Code, Gemini CLI, Codex, etc.):
  159. ```bash
  160. npx skills add longbridge/gpui-kit
  161. ```
  162. | Skill | Description |
  163. | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
  164. | `gpui-kit` | Setup, component catalog, usage patterns, GPUI mechanics (elements, entities, async, focus, actions, tests), and the Coding Guides. |
  165. | `gpui-kit-design-guides` | The Design Guides: layout, spacing, hierarchy, interaction states, overlays, and interface copy. |
  166. ## Development
  167. ### Desktop Gallery (Story)
  168. The `story` crate is a gallery application that showcases all available components. Run it with:
  169. ```bash
  170. cargo run
  171. ```
  172. ### Examples
  173. Some larger examples reuse the `story` gallery components and run as standalone packages:
  174. ```bash
  175. # Dock layout system (panels, split views, tabs)
  176. cargo run -p example-dock
  177. # Markdown rendering
  178. cargo run -p example-markdown
  179. # HTML rendering
  180. cargo run -p example-html
  181. ```
  182. The `examples` directory also contains standalone examples, each focused on a single feature. Each example is a separate crate, run them with `cargo run -p <name>`:
  183. ```bash
  184. # Code editor with LSP support and syntax highlighting
  185. cargo run -p example-editor
  186. # Basic hello world
  187. cargo run -p hello_world
  188. # System monitor (real-time charts with CPU/memory data)
  189. cargo run -p system_monitor
  190. # Window title customization
  191. cargo run -p window_title
  192. ```
  193. Check out [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
  194. ## Compare to others
  195. See the [comparison with Iced, egui and Qt 6](https://gpui-kit.com/docs/comparison) on the site.
  196. ## Related project: Native Shell
  197. [Native Shell](https://nsh.dev) ([source](https://github.com/longbridge/native-shell)) is a sibling project that lets AI generate UI and renders it natively on iOS, Android, Linux (GTK) and macOS (AppKit). Its GPUI desktop backend is in development and will be built on GPUI Kit.
  198. ## License
  199. Software source and documentation code examples: [Apache-2.0](LICENSE-APACHE).
  200. Documentation prose and original illustrations in the Docs, Base, Component, and Shell sections (including Chinese translations) for which GPUI Kit holds licensing rights are also offered under [CC BY 4.0](LICENSE-DOCS.md). When copying or adapting that material, credit **GPUI Kit**, link to the source page and [CC BY 4.0 license](https://creativecommons.org/licenses/by/4.0/), and indicate changes. Existing Apache-2.0 permissions remain; earlier revisions retain their prior terms, and third-party contributions keep their own licenses unless separately authorized. Using facts or ideas without copying protected expression does not require attribution under CC BY 4.0.
  201. - Built on [GPUI](https://github.com/zed-industries/zed), the UI framework from Zed Industries, also Apache-2.0. The `gpui-pre-*` crates are snapshots of it, published with Zed's license and notices intact.
  202. - UI design based on [shadcn/ui](https://ui.shadcn.com), some from [Reui](https://reui.io).
  203. - Icons from [Lucide](https://lucide.dev).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.