Skip to content

kit: Add optional gpui-fast backend - #3375

Merged
huacnlee merged 6 commits into
mainfrom
add-gpui-fast-feature
Oct 6, 2026
Merged

huacnlee merged 6 commits into
mainfrom
add-gpui-fast-feature

Conversation

@huacnlee

@huacnlee huacnlee commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Add an optional gpui-fast feature across GPUI Kit’s existing crates:

gpui-kit = { version = "0.7", features = ["gpui-fast"] }

No new crates. Preserve the existing gpui-pre-* workspace dependencies and default backend; optional Fast dependencies and internal conditional aliases select the engine. Existing application imports and macros continue to work. This is additive, with no breaking changes. Upstream packages still compile because Cargo features are additive.

Public API

  • gpui-kit: gpui-fast selects Fast for core, platforms, and enabled layers.
  • gpui-base, gpui-component, gpui-kit-assets, gpui-fps, gpui-wry, gpui-shell, gpui-component-shell: gpui-fast selects the matching backend for standalone consumers.
  • gpui-component-macros: #[derive(IntoPlot)] additionally recognizes direct Fast dependencies.
  • Gallery and examples expose the same feature for comparisons.

Validation

27 focused UI/macro/assets tests and 9 documentation tests pass. Default/Fast configurations, examples, WebView, Shell, benchmarks, and nightly WebAssembly compile. Clippy, formatting, dependency, and snapshot-pin checks pass. CI adds native and WebAssembly coverage.

AI-assisted with Codex.

@huacnlee
huacnlee enabled auto-merge (squash) October 6, 2026 07:32
@huacnlee
huacnlee merged commit 7eb5209 into main Oct 6, 2026
15 of 16 checks passed
@huacnlee
huacnlee deleted the add-gpui-fast-feature branch October 6, 2026 07:41
huacnlee added a commit to huacnlee/gpui-omarchy that referenced this pull request Oct 6, 2026
## Summary
Enable GPUI Fast by default through `gpui-fast =
["gpui-kit/gpui-fast"]`. Update the native and web gallery dependencies
and simulate frame callbacks in three existing animation tests.

## Public API
`gpui-fast` Cargo feature: forwards backend selection to GPUI Kit;
enabled by default. Rust signatures are unchanged.

## Breaking Changes
The default backend changes from GPUI Pre to GPUI Fast.

## Dependencies
Uses GPUI Kit `main` after [PR
#3375](longbridge/gpui-kit#3375) merged. Do not
publish until the feature is released and the Git dependency is replaced
with the released version.

## Test plan
- [x] Default backend: 90 library tests and 25 gallery tests pass.
- [x] Without defaults: 90 library tests and all-target compilation
pass.
- [x] WASM gallery compiles on nightly.
- [x] Formatting and Clippy complete; Clippy reports three existing
warnings in surface/theme code.

AI-assisted with Codex.
feigeCode added a commit to feigeCode/gpui-kit that referenced this pull request Oct 7, 2026
Sync longbridge/gpui-kit upstream through 29c0457, including:
- kit: optional gpui-fast backend (longbridge#3375)
- webview: compose native views with the GPUI Fast backend (longbridge#3389)
- kit: one Windows manifest with GPUI Fast (longbridge#3380)
- input/diff/tooltip/test updates

Local fork kept: caret gpui-pre pins (navop resolves them via [patch] to
fork tags), IconColorMode color/mono extension, CE-generic ports.
huacnlee added a commit that referenced this pull request Oct 7, 2026
## Description

On macOS with the default gpui-pre backend, the native `WKWebView` sits
above GPUI's Metal layer, so `PopupMenu`, dialogs and tooltips that
overlap the page are hidden behind it. Only GPUI Fast's window
composition places deferred overlays above the native view:

```text
front  GPUI overlay    deferred draws (PopupMenu, Dialog, Tooltip …)
       native surface  WKWebView / X11 child window
back   GPUI base       the root view
```

`gpui-webview` now always runs on GPUI Fast:

- It depends on `gpui-kit` with `default-features = false, features =
["gpui-fast"]` instead of on GPUI directly. Feature unification turns on
`gpui-fast` for the application's own `gpui-kit`, so **applications need
no manifest change**.
- The gpui-pre code paths and `#[cfg(feature = "gpui-fast")]` branches
are removed; composition is always used on macOS and Linux.
- The crate's `gpui-fast` feature is kept as a no-op so manifests that
enable it still resolve.
- `examples/webview` drops its `gpui-fast` feature; `cargo run -p
webview` shows the menu above the page.
- Because `gpui-webview` turns on `gpui-kit/gpui-fast` for every member
built with it, CI's workspace lint and test, and the `bump-gpui.ts` kit
check, exclude `gpui-webview` and `webview`; CI lints them in a separate
step and tests `gpui-webview` in the GPUI Fast job. The rest of the
workspace keeps checking gpui-pre.
- README and WebView docs (en / zh-CN) updated.

`cargo publish -p gpui-webview --dry-run` fails today because the
published `gpui-kit` 0.7.1 has no `gpui-fast` feature; it resolves once
the next `gpui-kit` release (which includes #3375) is published together
with this crate.

Verified on macOS: the example's "…" dropdown menu renders above the
WebView on GPUI Fast.

## Breaking Changes

No manifest change is needed, but an application that depends on
`gpui-webview` now runs entirely on GPUI Fast instead of gpui-pre.

## Public API

### `gpui-webview`

- `gpui-fast` feature — now has no effect; GPUI Fast is always used.
Kept for manifest compatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
linruohan pushed a commit to linruohan/gpui-component that referenced this pull request Oct 9, 2026
## Description

On macOS with the default gpui-pre backend, the native `WKWebView` sits
above GPUI's Metal layer, so `PopupMenu`, dialogs and tooltips that
overlap the page are hidden behind it. Only GPUI Fast's window
composition places deferred overlays above the native view:

```text
front  GPUI overlay    deferred draws (PopupMenu, Dialog, Tooltip …)
       native surface  WKWebView / X11 child window
back   GPUI base       the root view
```

`gpui-webview` now always runs on GPUI Fast:

- It depends on `gpui-kit` with `default-features = false, features =
["gpui-fast"]` instead of on GPUI directly. Feature unification turns on
`gpui-fast` for the application's own `gpui-kit`, so **applications need
no manifest change**.
- The gpui-pre code paths and `#[cfg(feature = "gpui-fast")]` branches
are removed; composition is always used on macOS and Linux.
- The crate's `gpui-fast` feature is kept as a no-op so manifests that
enable it still resolve.
- `examples/webview` drops its `gpui-fast` feature; `cargo run -p
webview` shows the menu above the page.
- Because `gpui-webview` turns on `gpui-kit/gpui-fast` for every member
built with it, CI's workspace lint and test, and the `bump-gpui.ts` kit
check, exclude `gpui-webview` and `webview`; CI lints them in a separate
step and tests `gpui-webview` in the GPUI Fast job. The rest of the
workspace keeps checking gpui-pre.
- README and WebView docs (en / zh-CN) updated.

`cargo publish -p gpui-webview --dry-run` fails today because the
published `gpui-kit` 0.7.1 has no `gpui-fast` feature; it resolves once
the next `gpui-kit` release (which includes longbridge#3375) is published together
with this crate.

Verified on macOS: the example's "…" dropdown menu renders above the
WebView on GPUI Fast.

## Breaking Changes

No manifest change is needed, but an application that depends on
`gpui-webview` now runs entirely on GPUI Fast instead of gpui-pre.

## Public API

### `gpui-webview`

- `gpui-fast` feature — now has no effect; GPUI Fast is always used.
Kept for manifest compatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant