GPUI Kit
One dependency for building desktop applications with GPUI:
[]
= "0.6"
gpui-kit depends on the matching set of GPUI crates, so an application
never lists GPUI itself. use gpui_kit::*; is GPUI, and each layer is
reachable by name:
| Path | Crate | Feature |
|---|---|---|
gpui_kit::* |
gpui |
always |
gpui_kit::platform |
gpui_platform |
always |
gpui_kit::base |
gpui-base |
always |
gpui_kit::component |
gpui-component |
component (on) |
gpui_kit::assets |
gpui-kit-assets |
assets (on) |
gpui_kit::application() opens the platform and gpui_kit::init()
initializes the enabled layers:
use *;
use Root;
use *;
;
The gpui-component features (inspector, decimal, tree-sitter,
tree-sitter-languages, and each tree-sitter-<language>) are available on
gpui-kit under the same names. test-support turns on GPUI's test harness
for #[gpui_kit::test], TestAppContext, VisualTestContext, and native-platform
rendering support; enable it under [dev-dependencies]. It also exposes
gpui_kit::test::{TestWindowExt, TestAppContextExt, TestSupportExt, ElementSnapshot} for
UI integration testing: render real components in headless windows, simulate input,
and verify state, focus, layout and application callbacks. gpui_kit::TestSupportExt is also
available without the feature: .test_support() keeps production render chains
intact and returns the original element in normal builds. Snapshots read native
accessibility properties without hand-supplied state. See UI integration testing for usage.
The independent profiler feature enables GPUI frame-event instrumentation and is off by default.
See https://gpui-kit.com for the guides.