Skip to content

Compatibility

GPUI-RSX’s primary verified target is GPUI Kit and its exact gpui-pre snapshot (published by Longbridge with independent version numbers from the official gpui crate).

The macro and core crates have no GPUI runtime dependency. Aliasing gpui-kit as gpui keeps generated gpui:: paths and GPUI derives aligned automatically.

GPUI-RSX GPUI Kit GPUI snapshot Component
0.13.0 0.10.0 gpui-pre@0.3.12 gpui-component@0.10.0

This matrix comes from demo/Cargo.lock. Kit supplies GPUI, components and assets; the Cargo alias below preserves the gpui:: path used by RSX expansions. Commit the application lockfile.

[dependencies]
gpui = { package = "gpui-kit", version = "=0.10.0" }
gpui-rsx = "0.13.0"
Target How it is validated Coverage
Pinned Kit snapshot (above) Generated API contract, demo builds, tests, and doctests on Linux & macOS CI Full mapped GPUI method surface and documented Kit integration
Renamed Kit dependency Dedicated demo CI fixture without a gpui crate alias Configured gpui-path, components, IDs, fragments, inline dynamic classes, and shared runtimes
Official gpui = "=0.2.2" Dedicated macOS fixture sharing core regression cases Keys, component defaults, fragments, events, identity, and state updates (not the full API surface)
Other versions or backends Not covered by this matrix Validate your dependency graph, generated code, and runtime behavior before adopting

When diagnosing an unverified combination, establish a working baseline with the pinned matrix first, then change one dependency at a time.

Prefer gpui = { package = "gpui-kit", ... }. If your crate already names the dependency something else (for example, engine), you have two options:

Cargo.toml
[dependencies]
engine = { package = "gpui-kit", version = "=0.10.0" }
src/main.rs
extern crate engine as gpui;

With the default configuration, every binary, example, or integration-test target that uses RSX needs that alias in its own crate root.

rsx.toml
[options]
gpui-path = "::engine"
  • Covers generated paths in markup, components, automatic IDs, dynamic keys, rsx_listener!, rsx_update!, and rsx_runtime!().
  • Supports crate-root re-exports such as crate::ui (each target must expose that re-export).
  • Paths cannot contain generic arguments or start with self or super.
  • An explicit rsx_runtime!(::other_engine) overrides this setting.
  • With a custom gpui-path, #[component] functions implement IntoElement via ViewElement, so GPUI 0.2.x (which uses Component) supports #[component] functions only under the default gpui crate name.

User expressions, explicit prop types, and GPUI’s own derive macros still follow their own imports (for instance, #[derive(engine::IntoElement)] may still reference gpui::). Verify the renamed-dependency fixture locally with:

Terminal window
cargo +1.98.1 test --manifest-path tests/fixtures/gpui-renamed/Cargo.toml --target-dir demo/target
Item Value
Rendering backend Kit’s default gpui-pre from crates.io
GPUI-RSX root crate MSRV 1.88.0
Demo Rust toolchain 1.98.1
Demo check command cargo +1.98.1 check --manifest-path demo/Cargo.toml --bins --locked

The root crate MSRV and demo toolchain are managed separately—developing the macro itself does not require GPUI platform libraries.

A dedicated macOS fixture verifies dynamic string keys, numeric component defaults, mixed root fragments, listener signatures, element identity, and explicit state updates against gpui = "=0.2.2" (with font-kit, runtime_shaders, test-support, and tailwind-scale):

Terminal window
cargo test --manifest-path tests/fixtures/gpui-0.2.2/Cargo.toml

Use Kit’s unified re-exports through gpui::component, gpui::base, and gpui::platform:

  • Call gpui::init(cx) before opening windows.
  • Mount roots with gpui::open_window(...).
  • Load icons via application().with_assets(gpui::assets::Assets).

Do not mix direct Zed Git gpui, gpui_platform, or standalone Git component dependencies alongside GPUI Kit—each crate instance defines distinct Rust types that cannot be interchanged.

Verify your dependency tree has a single engine instance:

Terminal window
cargo xtask check-gpui
cargo tree --manifest-path demo/Cargo.toml --locked -i gpui-pre

Follow GPUI Kit’s stable releases. The compatibility workflow tracks the latest non-yanked Kit release on crates.io, updates the demo pin, and regenerates the lockfile, API tables, snapshots, specification, and this matrix. GPUI Fast is optional; the verified matrix covers Kit’s default gpui-pre backend.