GPUI 0.3 spike (2026-11-18)
This is a disposable spike report, not a migration. It answers one question: what breaks if Auro
moves from gpui = "=0.2.2" to the gpui-pre 0.3.x line, and is the hot-reload path still viable?
Environment
- CachyOS Linux 7.3.4-1, x86_64, 12 CPUs, 22 GiB RAM.
- niri/Wayland (
WAYLAND_DISPLAY=wayland-1,DISPLAY=:0). - rustc/cargo 1.99.1, dx 0.7.10.
- New dependency set:
gpui-pre =0.3.12(aliased asgpui),gpui-pre-linux =0.3.12,gpui-component =0.10.0,accesskit 0.24.1. gpui-pre 0.3.13exists, butgpui-component 0.10.0pinsgpui-pre =0.3.12. The spike pins the whole line to0.3.12; mixing 0.3.12 and 0.3.13 would create twogpuitype universes.- The
xattr 0.2.3vendor patch is unused by this dependency graph;xattr 1.7.0is in the tree.
Results
| Target | Command | Result |
|---|---|---|
auro-ui | cargo check -p auro-ui | pass after 34.8 s of dependency build |
| workspace | cargo check --workspace | pass after 2 API edits |
examples/hello | cargo check | pass |
examples/log-viewer | cargo check with gpui-component =0.10.0 | pass without source changes |
| generated app | auro new + cargo check --features hot-reload | pass after replacing gpui::Timer |
| hot reload | auro dev, [dev] hot = true | pass; 20 boundary edits, same pid |
The first app build through dx took 72.41 s (shared dependency target, cold app crate). A host
rebuild after a types/ui edit took 3.09 s.
A runtime smoke of examples/hello on the same target built in 3m05s (debug) and ran: it printed
auro:startup and was killed by a 10 s timeout while the event loop was still running (expected
for a window app).
Broken APIs
Only two workspace call sites needed changes; the generated template needed one more.
Application::new()is gone.gpui-prenow takes a platform:Application::with_platform(Rc<dyn Platform>)orApplication::new_inaccessible(...). The platform implementation lives in a separate crate (gpui-pre-linux,gpui-pre-macos,gpui-pre-windows), and the app chooses it withcurrent_platform(false)/linux_platform(...). This is an architectural change for Auro:auro-uiorauromust own the target-specific platform dependency, andauro new/CI must exercise each platform crate. The spike hardcodes the Linux platform.cx.on_window_closednow takes(cx, WindowId)instead ofcx. Auro ignores the id and recomputes the open-window set, so the change is mechanical.gpui::Timeris no longer re-exported (0.2.2 re-exportedsmol::Timer). The scaffold used it in the snapshot debounce; the spike addssmol = "2"to theuicrate and importssmol::Timer. This is a template change, not a framework API change.Window::focus_nextnow takes&mut App.crates/auro-ui/tests/button_keyboard.rs:31callswindow.focus_next()and fails to compile; the test must pass the app context. This is a test API change that a real migration must include, not just a library call site.- The spike hardcodes
gpui_linux::current_platform(false). The CI matrix fails on macOS and Windows withcannot find module or crate gpui_linux;ubuntu-latestalso failed in the first CI run. A real migration needs target-specific platform crates and a per-target CI leg.
gpui-component 0.10.0 compiled the existing log-viewer source without changes. That is a
compile result, not a runtime or visual verification. The spike branch's Linux 22.04 build passes;
the other matrix legs fail for the platform/test reasons above, which is expected for a Linux-only
spike and is recorded rather than hidden.
Hot reload
The existing auro::hot data boundary (view_data() -> HotData, subsecond/dx 0.7.10) works with
gpui-pre 0.3.12. A first edit measured 314 ms save-to-render (patch 272 ms, patch-to-render
0 ms). The app then received a host-only edit (ui/types) and was restarted by auro dev
(host rebuild failed; previous UI still running while the files were inconsistent; then a
successful restart).
For a real layout/tree test, the host was taught to interpret four boundary values (padding,
gap, radius, tree) and to add/remove children from tree. This host change is a restart. The
running host (pid 2413989) then received 20 boundary edits that changed the title, accent, padding,
gap, radius and tree (0/1/2 extra children):
| N | median | min | max | patch-to-render |
|---|---|---|---|---|
| 20 | 296 ms | 285 ms | 415 ms | 0-1 ms |
All 20 edits stayed in the same pid, the host renders counter advanced 5→24, and no relaunch
occurred. The ViewData schema was bumped to 2 and the old host rejected the incompatible frame
during the transition, which is the intended guard.
This is not element-code hot reload. The boundary carries layout values; ui/Render code
still lives in the host and a change there restarts the process. It does show that a data-driven
layout/tree can change in the same process well under the 1 s experimental target.
Platforms and accessibility
- Only Linux x86_64 was built and run.
gpui-pre-macosandgpui-pre-windowsexist, but the spike has no Apple or Windows host and did not cross-compile the full GUI stack. - Windows hot reload of element-returning view code was already blocked on 0.2.2 (main-thread stack overflow); this spike did not retest it. The data-boundary design remains the portable shape.
gpui-prehas an optionalhot-reloadfeature that depends onsubsecond 0.7.10anddioxus-devtools-types; it was not enabled or tested. It may be a better migration path than Auro's ownauro::hotboundary, but that needs its own spike.- AccessKit is a dependency (
accesskit 0.24.1,accesskit_unix 0.22.1). A dependency does not prove functional accessibility: no screen reader, AT-SPI tree inspection, keyboard traversal or IME test was run.Application::new_inaccessibleexists, but the default path was not audited. gpui-component 0.10.0depends ongpui-pre =0.3.12; a future 0.3.13 pin needs a matchinggpui-componentrelease or a patch.
Recommendation
Do not migrate main yet. The migration is smaller than the 0.2.2 feasibility spike suggested
(two workspace call sites, one template dependency), but the platform split, the AccessKit/IME
audit, the Windows runtime and the hot-reload mechanism choice are still open. If Auro decides to
migrate:
- Pin
gpui-pre =0.3.12,gpui-pre-{linux,macos,windows} =0.3.12, andgpui-component =0.10.0together; do not mix 0.3.12 and 0.3.13. - Move platform selection into
auro-ui(the only crate that names GPUI) and add a per-target CI check for the platform crates. - Change
Application::newto the platform factory,on_window_closedto the two-argument callback, and thefocus_nexttest call site to pass the app context in the same PR. - Replace
gpui::Timerin the template withsmol::Timer(or a deliberateauro-uire-export) and addsmolto the generateduicrate. - Re-run the hot-reload boundary benchmark and the
examples/hello/log-viewerruntime, then decide whether to keepauro::hotor evaluategpui-pre's ownhot-reloadfeature. - Drop the unused
xattrpatch only after the dependency graph proves it is unnecessary.
Evidence
- Spike worktree:
/run/media/pdl/data/Projetos/auro-wt-gpui03(branchagent/gpui-0.3-spike). - Build logs:
gpui03-check.log,gpui03-workspace.login that worktree. - Hot-reload log:
/tmp/auro-gpui03-dev.log; generated app:/tmp/auro-gpui03-demo. - The layout experiment is a throwaway app; it is not a committed example.
- The spike branch is Linux-only and is not intended to merge. This page is the deliverable.