From the crate repositories
Examples, not registry consumers.
These five are the most visual programs in the workspace, and they are
not published-version consumers: their manifests take the core from a
sibling bite-gpui checkout. They run from a clone, and they
are where the surface path is easiest to see.
interop_wgpu
Shove · wgpu
A 3D viewport on GPUI's device
An instanced field of lit cubes drawn by an ordinary wgpu pipeline into an exportable image. On the same device as the window, WgpuSurface plus paint_texture composites it with no export, no fence and no CPU copy; the chrome is real GPUI buttons and a frame-interval histogram outside the producer's hitbox.
- the same-device fast path, no dma-buf and no fence
- pause, speed, palette and reset are GPUI controls
- needs a Linux GPU: the export is a dma-buf from a Vulkan adapter
From a gpui_interop checkout; the core is a path dependency.
Example · interop_wgpu
interop_bevy
Shove · bevy
Bevy, headless, on GPUI's device
Bevy is built headless — no winit, no window, no event loop of its own — and renders a procedurally spawned 7 × 7 field of lit cubes to an offscreen image on the window renderer's wgpu device. Bevy's meshes and passes run on the device GPUI already draws with, and each paint is one Bevy tick.
- one Bevy tick per GPUI paint
- paint_texture by default; --transfer for the dma-buf shape
- ~4–6 ms/frame on the test laptop
- Linux only; Bevy renders on the window renderer's own device
From a gpui_interop checkout; the core is a path dependency.
Example · interop_bevy
interop_cube_drag
Shove · Vulkan
A separate renderer, by the handle
A Vulkan producer owns its device and renders a spinning cube, exports the frame as a dma-buf with its modifier and a sync_file, and GPUI's renderer imports it in place. Dragging turns the cube: the buttons occlude and keep their clicks, while the text panel claims nothing, so a drag across it still reaches the scene.
- dma-buf with a DRM modifier and a sync_file fence
- drag reaches the scene; only the buttons occlude
- Linux, with a driver that exports dma-bufs
From a gpui_interop checkout; the core is a path dependency.
Example · interop_cube_drag
gpui_video · player
Shove · video
Hardware-decoded video, one element
VA-API decodes into driver-tiled NV12 surfaces, exports them as dma-bufs, and GPUI samples them in place. The application writes video().source(path).controls(true); playback is paced to the stream's frame period and the default control bar is HTML5-shaped.
- Linux / VA-API is the only implemented backend
- pre-release 0.1, not published under these names
- the decoder and renderer must share one GPU
From a gpui_video checkout; the core is a path dependency.
Example · player
gpui_video · grid
Shove · video
Sixteen by sixteen decoders
A wall of independently decoded videos, each pane its own decoder and its own frame, with live FPS and CPU metrics in the header. The mode chip switches the handover between zero-copy dma-buf and CPU read-back; --morphorm, with the morphorm feature, runs the same grid on the second layout engine.
- 16×16 by default; --cols and --rows change it
- zero-copy dma-buf or CPU read-back, switchable at runtime
- --morphorm needs --features morphorm and runs on the second LayoutEngine
From a gpui_video checkout; the core is a path dependency.
Example · grid