Search tools, AI agents, MCP servers
Submit a tool

Search iThub

Search tools, categories and collections. Type at least two characters.

Explore all tools
↑ ↓ to explore resultsEnter to open · Esc to close

GPUI

Apache-2.0, GPU-accelerated Rust UI framework from Zed Industries, developed as a crate inside the Zed repository

Web Frameworks & UI LibrariesOpen sourcev1.28.1

GPUI at a glance

Pricing
Open source
Deployment
macOS / Linux app
License
Open source
Version
v1.28.1November 11, 2026
Platforms
macOSLinux
Language
Rust
Data location
Library compiled into the developer's own application; GPUI runs locally and operates no hosted service.
Maker
zed-industries

What is GPUI?

GPUI is the user interface framework that Zed Industries develops for the Zed code editor. Its README describes it as a hybrid immediate and retained mode, GPU accelerated UI framework for Rust, designed to support a wide variety of applications. GPUI draws its own interface with the GPU instead of embedding a browser or using platform-native widgets. The GPUI examples guide lists Metal on macOS, DirectX 11 on Windows and wgpu on Linux, where X11 or Wayland handles windowing. The project site gpui.rs presents GPUI as coming from the creators of Zed and Delta.

GPUI has no repository of its own. It is the crates/gpui crate inside the zed-industries/zed repository, next to platform crates such as gpui_macos, gpui_windows, gpui_linux, gpui_web and gpui_platform. gpui.rs states that GPUI is tied to Zed for the near future, so contributions are made in the Zed repository and kept in sync with the editor. The gpui crate manifest declares the Apache-2.0 license, while the zed editor crate and Zed's ui component crate declare GPL-3.0-or-later.

The Zed blog documents the history. A post from March 7, 2023 explains that the team built its own UI framework to reach the performance it wanted for the editor and wrote a custom shader for each graphical primitive: rectangles, shadows, text, icons and images. On January 3, 2024 the post GPUI 2 is now in production announced a Zed preview built on a completely rewritten version of the framework. The post on ownership and data flow in GPUI (January 25, 2024) describes the central design: every model or view is owned by a single top-level App object.

GPUI is published as the gpui crate on crates.io. The newest release is 0.2.2 from October 22, 2025, and docs.rs hosts its API reference. The README calls GPUI pre-1.0, warns of frequent breaking changes between versions and requires the latest stable Rust. The README shipped with 0.2.2 asks for macOS or Linux and starts an app with Application::new(). The README on the main branch adds the optional gpui_platform crate, whose gpui_platform::application() picks windowing and text backends for macOS, Linux, FreeBSD and Windows; crates.io lists no gpui_platform or gpui_web crate.

gpui.rs describes the scope: GPUI provides the UI framework, not the rest of an application architecture, and it neither provides a browser DOM nor turns its controls into native platform widgets. Documentation consists of the README, the crate-level docs, guides on contexts and key dispatch, the examples directory, and the Zed source code, which the README names as the best current learning resource. Similar Rust UI listings on iThub include Rune and egui.

Key capabilities

  • GPU rendering on three desktop platforms GPUI renders every element itself through Metal on macOS, DirectX 11 on Windows and wgpu on Linux. On Linux and FreeBSD at least one windowing backend, Wayland or X11, has to be enabled; on Windows windowing uses Win32 and text uses DirectWrite. The published 0.2.2 README lists macOS and Linux; Windows support is documented on the main branch.
  • Entities for application state State that different parts of an app share lives in entities. GPUI owns them, and code reaches them through an owned smart pointer that works like Rc. The App context owns all entity data, and Context<T> adds notifications and events for one entity.
  • Async contexts The contexts guide explains that to_async creates an async context with a static lifetime that can be held across await points. Calls through it are fallible, because the window or the whole app may be gone by then. An async executor is integrated with the platform event loop.
  • Views and the Render trait A view is an entity that implements Render. At the start of each frame GPUI calls render on the root view of each window, which builds a tree of elements. A handler that changes view state calls cx.notify() to request a new render; changing a field alone does not trigger one.
  • Tailwind-style styling Layout and style are chained Rust methods such as flex(), flex_col(), gap_3() and items_center(), modelled on CSS utility classes. Grid layout with grid_cols and col_span is available, and container_query switches layouts by container size. gpui.rs notes that CSS compatibility is incomplete and follows what Zed and Delta need plus community requests.
  • Elements for low-level control Elements are the imperative layer under views and control how they and their children render. The README names efficient views into large lists and custom layout for a code editor as typical uses, and the div element is the general-purpose building block.
  • Actions and key dispatch The key dispatch guide states that GPUI is designed for keyboard-first interactivity. Actions are user-defined structs that turn keystrokes into logical operations, key bindings are registered in app setup, and key_context scopes where a binding applies.
  • Mouse handlers in plain Rust Click and other mouse handlers call application code directly, with no browser-to-Rust boundary in between. Examples cover drag and drop, popovers, scrollable areas, tab stops, visible focus and mouse pressure.
  • Windows, menus and platform services Platform services such as quitting the app or opening a URL are methods on App, and App::open_window() creates windows. Examples set application menus, position and move windows, draw window shadows, move an entity between windows and post, replace, dismiss and respond to system notifications.
  • Text, images and animation The examples directory includes styled text, text layout with alignment and decorations, text wrapping and truncation, text input with selection, image loading and galleries, a GIF viewer, SVG rendering and SVG animation, gradients, opacity, patterns, box shadows and general animation.
  • Accessibility GPUI uses AccessKit to expose an accessibility tree. gpui.rs states that, as on the web, developers are responsible for making their custom controls accessible, and the repository has an a11y example and an accessibility topic linked from the README.
  • Test support The #[gpui::test] macro gives tests a TestAppContext that simulates common platform input. The leak-detection Cargo feature, also enabled by setting GPUI_LEAK_DETECTION at build time, tracks every entity handle so tests can assert that nothing leaked.
  • Optional Cargo features The default feature set of the crate on main is font-kit, wayland, x11 and windows-manifest. Further features include inspector, hot-reload, screen-capture, profiler and bench-support. On macOS, glyph rasterization needs font-kit; without it text is laid out but no glyphs render.
  • Browser gallery in the repository The examples README describes a web gallery in crates/gpui_web/examples/hello_web that builds a selection of examples (hello world, styled text, text layout, wrapping, text input, dynamic font loading and a background task demo) to WebAssembly with Trunk. Its toolchain file selects nightly Rust, and it needs a browser with WebGPU or WebGL2.
  • Contexts as the main interface Each of the three registers (entities, views and elements) comes with one or more context types, usually passed as cx. The README calls the context the main interface to GPUI: it gives access to application state, entity creation, windows and platform services, and it is used throughout the framework and in Zed's own crates.
  • Font loading on missing glyphs The dynamic-fonts example registers App::on_missing_glyphs, downloads a fallback font once when text contains glyphs the bundled font lacks, calls add_fonts and refreshes the windows so the text is shaped again. The example README describes it as a small script-to-font mapping, not a general font discovery service.
  • Reference code in Zed Gpui.rs points to further documentation and examples throughout the Zed crates and in Zed's ui crate, which contains the components the editor uses. That crate is licensed GPL-3.0-or-later, unlike the Apache-2.0 gpui crate, so the two come under different terms.
  • Installation on macOS GPUI uses Metal on macOS, so the README asks for Xcode from the App Store or the Apple Developer site, launched once to install the macOS components, plus the Xcode command line tools from xcode-select --install. The tools must point at the installed Xcode with sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer.
  • Installation in a Cargo project The README adds gpui = { version = "*" } to Cargo.toml; on the main branch it adds gpui_platform with the font-kit, wayland and x11 features as a cross-platform default. From a Zed checkout, examples run with cargo run -p gpui --example hello_world.

Where GPUI fits

Starting a standalone application

Every GPUI app starts with an Application: Application::new() in the published 0.2.2 crate, or gpui_platform::application() on the main branch. A callback passed to run() receives the App context, opens a window with App::open_window() and registers the root view. The hello world sample on gpui.rs opens a centered 500 by 500 pixel window with Bounds::centered and WindowOptions, then builds a styled div tree with a greeting and six colored squares. The same program ships as the hello_world example in the repository.

Building stateful views

The counter example on gpui.rs keeps a count in a struct that implements Render. A click handler created with cx.listener increments the field and calls cx.notify(), and GPUI renders the view again. The same pattern applies to any view that owns state shared through entities: other entities can observe an entity and are notified when it calls cx.notify(). The ownership post on the Zed blog walks through this flow with a second counter entity that observes the first and stores double its count.

Keyboard shortcuts with actions

An action such as Increment is declared with the actions! macro, handled on a view with on_action and bound in app setup with KeyBinding::new("up", Increment, Some("Counter")). The view sets key_context("Counter"), so the binding applies only inside that part of the element tree. Mouse access to the same feature is a button with a click handler, as the key dispatch guide describes, so one action can serve both the keyboard and the pointer.

Responsive layouts

The grid layout example on gpui.rs uses a five-column grid with a full-width header, a sidebar spanning one column and content spanning three. When the container becomes narrow, container_query switches the same content to a stacked flex layout, similar to CSS container queries. The example is linked from gpui.rs and is in the repository as grid_layout.rs.

Following GPUI changes

Because GPUI is developed inside the Zed repository, its changes land through the Zed commit history and are not tagged as separate GitHub releases; the GitHub releases of zed-industries/zed are Zed editor versions. Published versions of the crate appear on crates.io, with matching API documentation on docs.rs, while the README on the main branch can describe code that is newer than the last crates.io release.

Testing interface behaviour

Tests marked with #[gpui::test] receive a TestAppContext that simulates platform input. The testing example covers actions, focus and window-based tests, and the leak-detection feature lets a test check that no entity handle outlives it.

Running examples in a browser

From crates/gpui_web/examples/hello_web, trunk serve serves the web gallery at http://localhost:8080/, with paths such as /hello-world, /text-layout and /input. Each path loads only its own WebAssembly module. The gallery is part of the repository; the gpui_web crate is not published on crates.io.

Reviews of GPUI

No reviews yet

Be the first to share your experience with GPUI.

Loading review form…

Found GPUI useful? Upvote it todayYour vote helps other IT teams find it in the daily ranking.

Similar to GPUI

Compare:GPUI vs RuneGPUI vs eguiGPUI vs Refine

  1. RuneRust UI framework with its own GPU renderer, text, layout and springs for desktop, iOS and webWeb Frameworks & UI Libraries138 views
  2. eguiImmediate mode GUI library in Rust for native desktop, Android and web apps via WebAssemblyWeb Frameworks & UI Libraries4 views
  3. RefineMIT-licensed headless React framework for admin panels, dashboards, internal tools and B2B appsWeb Frameworks & UI Libraries51 views
  4. Next.jsMIT-licensed React framework with App Router, Server Components, Turbopack and self-hosting optionsWeb Frameworks & UI Libraries43 views
  5. SvelteKitWeb application framework built on SvelteWeb Frameworks & UI Libraries31 views
  6. RemixFull-stack TypeScript framework on Web APIs: routing, data, auth, sessions, UI and assets in one remix packageWeb Frameworks & UI Libraries30 views
  7. AstroWeb framework for content-driven sites with zero JS by defaultWeb Frameworks & UI Libraries26 views
  8. NuxtOpen-source full-stack framework for building with VueWeb Frameworks & UI Libraries25 views