Mirror of temportalflux's GPUI-CE
  • Rust 99.2%
  • Python 0.5%
  • Just 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-26 17:22:31 -04:00
.cargo Keep component checkout standalone 2026-08-28 14:19:55 -07:00
.github [TEMP] remove workflows 2026-10-26 17:22:31 -04:00
assets move test fonts to a dedicated crate 2026-10-06 12:59:33 -04:00
crates Enable building on Linux with just x11 or wayland, or both. (#379) 2026-10-26 17:20:58 -04:00
docs Remove paint docs examples benches tests 2026-10-02 00:49:26 +00:00
scripts/sync-upstream ci fixes and cleanup 2026-09-04 05:00:51 +00:00
tooling/perf removed all of the git sources (#91) 2026-07-13 21:25:00 -04:00
.gitattributes Re-re-fork (#23) 2026-03-22 12:21:07 -04:00
.gitignore [Parley 1/7] Migrate the core text system (#261) 2026-10-02 16:53:34 +00:00
AI_POLICY.md Add Contributing and AI Policy documents (#334) 2026-10-22 13:49:52 -07:00
audit.toml ci fixes 2026-08-28 19:09:53 -07:00
Cargo.lock Make opacity grouped (#330) 2026-10-14 04:16:47 +00:00
Cargo.toml Enable building on Linux with just x11 or wayland, or both. (#379) 2026-10-26 17:20:58 -04:00
CHANGELOG.md Enable building on Linux with just x11 or wayland, or both. (#379) 2026-10-26 17:20:58 -04:00
clippy.toml My stab at CI (#66) 2026-06-15 18:42:57 -04:00
CONTRIBUTING.md Add Contributing and AI Policy documents (#334) 2026-10-22 13:49:52 -07:00
deny.toml the WGPU/WGSL migration (#215) 2026-09-07 13:08:31 -07:00
flake.lock Re-re-fork (#23) 2026-03-22 12:21:07 -04:00
flake.nix removed all of the git sources (#91) 2026-07-13 21:25:00 -04:00
justfile fuhget taplo 2026-09-22 04:12:22 +00:00
LICENSE.md Re-re-fork (#23) 2026-03-22 12:21:07 -04:00
MAINTENANCE.md add vouch workflow actions 2026-10-26 17:22:31 -04:00
README.md Add Contributing and AI Policy documents (#334) 2026-10-22 13:49:52 -07:00
rheo.toml Refactor docs (#77) 2026-06-20 09:37:49 -04:00
SETUP.md Overhaul Readme (#291) 2026-09-30 01:50:49 +00:00
typos.toml Fix typo exception for Noto Sans font filename 2026-10-07 04:15:13 +01:00

GPUI Community Edition banner

Website ​ · ​ Examples ​ · ​ Discord

GPUI - Community Edition

GPUI-CE is a fork of Zed's GPUI UI Framework.

It's mostly API compatible with upstream, but that is changing!

Overview:

  • Web-inspired Styling & Layout

    Build views with familiar elements, flex layouts, and Tailwind-style methods:

    div()
        .id("some_id_123")
        .flex()
        .items_center()
        .gap_2()
        .rounded_lg()
        .rounded_smoothing(0.8)
        .bg(rgba(0xffffff30))
        .backdrop_blur(px(12.0))
        .transitions(|transitions| transitions.bg(millis(200)))
        .hover_style(|style| style.bg(rgba(0xffffff60)))
        .child("Hello, GPUI")
    

    Layout example ​ · ​ Styling example

  • State and events

    Use Entity<T> to access view and shared application state. Observe changes and call cx.notify() when state changes to notify observers and update the view. For a view with a count field:

    div()
        .id("counter")
        .child(format!("Count: {}", self.count))
        .on_click(cx.listener(|this, _event, _window, cx| {
            this.count += 1;
            cx.notify();
        }))
    

    Interaction example

  • Actions and keybinds

    Define typed actions and bind them to keyboard shortcuts. Call register_keybinds during app setup to bind Space and Backspace in the focused counter:

    use gpui::{App, KeyBinding, actions};
    
    actions!(keybinds_example, [Increment, Reset]);
    
    fn register_keybinds(cx: &mut App) {
        cx.bind_keys([
            KeyBinding::new("space", Increment, Some("Counter")),
            KeyBinding::new("backspace", Reset, Some("Counter")),
        ]);
    }
    

    Connect the view's focus handle and action handlers:

    div()
        .key_context("Counter")
        .track_focus(&self.focus_handle)
        .on_action(cx.listener(Self::increment))
        .on_action(cx.listener(Self::reset))
        .child(format!("Count: {}", self.count))
    

    Keybind example

  • Virtualized lists

    Use uniform_list for large collections of equal-height rows. GPUI requests the item ranges needed for the visible area as you scroll.

    uniform_list("items", 10_000, |range, _window, _cx| {
        range
            .map(|index| {
                div()
                    .h(px(24.0))
                    .child(format!("Item {index}"))
            })
            .collect()
    })
    .h(px(300.0))
    

    List example

  • Custom drawing

    Use canvas to paint directly within a view. Implement Element when you need control over layout and rendering, such as for a code editor or custom widget.

    canvas(
        |_bounds, _window, _cx| {},
        |bounds, _state, window, _cx| {
            window.paint_quad(PaintQuad::new(bounds).background(rgb(0x5078f0)));
        },
    )
    .size(px(80.0))
    

    Drawing example

FAQ

  • Q: What is our AI Policy? A: See the genAI/LLM Policy document. GPUI-CE is a framework "Made by Humans". We value community participation and take time to understand contributors' intentions and offer guidance.

  • Q: What is the long-term goal of GPUI-CE? A: To become the go-to Rust GUI library for applications of any size. We want reusable components, native platform integration, and control over performance. We build on Zed's work and continue to bring in upstream fixes.

  • Q: How does the project compare to other forks in the ecosystem? A: Other forks often develop around the applications that use them. GPUI-CE aims to support a broad range of applications, with a focus on stability.

Contributing

Read the contributing and genAI/LLM Policy documents, which fully outline everything you need to know about how this project is maintained and what maintainers expect from contributors and contributions.

While you will need to read both documents in full to contribute, they can be summarized as:

  • use github discussions to discuss potential bugs or feature requests
  • issue tracker is all actionable work for anyone to pick up
  • there is a vouch system for new contributors to get maintainer approval for changes
  • issues and PRs from non-vouched contributors will be automatically closed
  • all commits/PRs must update the changelog if they affect functionality
  • there are commit content and description guidelines (see contributing doc)
  • do not use genAI/LLMs to create code or prose, and all other forms of usage must be disclosed

Then read the setup guide for installation instructions.