mirror of
https://github.com/vrc-get/vrc-get.git
synced 2026-06-21 09:58:08 +00:00
2.7 KiB
2.7 KiB
GPUI staged migration track
This repository now contains a staged migration track to move GUI rendering from Tauri/WebView to GPUI without deleting the working Tauri app.
Scope
- Keep
vrc-get-gui(Tauri) as the production frontend until feature parity is reached. - Add
vrc-get-gui-gpuias an experimental frontend crate in the same workspace. - Keep
vrc-get-vpmas the shared business/backend library for both frontends. - Introduce
vrc-get-gui-runtimefor a shared Tokio runtime bridge pattern.
Stages
Stage 1 – Validated ✅
Package management table POC (app/_main/projects/manage/-package-list-card.tsx equivalent):
- GPUI table rendering with striped rows and column headers.
- Text input with clear button and live search filtering.
- Dialog lifecycle (title, confirm button, child content).
- Native file dialog integration via
rfd. TokioBridgeasync plumbing (spawn/call/shutdown).
Stage 2 – In progress
Wire real vrc-get-vpm data into a live Projects list screen:
backend.rs— asyncload_projects()usingVccDatabaseConnection.ProjectsView— loading state → live data, live search filtering viacx.observe.TokioBridge::call()dispatches to Tokio; result is awaited in GPUI's async context viacx.spawn.
Stage 3 – Planned
Port pages in this order:
- Setup wizard
- Settings
- Log viewer
- Projects (full, with create/add/remove)
- Packages (last, hardest)
i18n migration
- Script added:
vrc-get-gui/scripts/i18next-to-rust-i18n.mjs - Converts i18next dotted-key JSON5 format to nested rust-i18n YAML.
- Run with:
npm run i18n:to-rustnpm run i18n:to-rust -- locales/ja.json5 locales/ja.yml
Native file dialog policy
- GPUI migration path uses
rfdfor native file/folder dialogs on Windows/macOS/Linux.
GPUI version pinning
- GPUI is pinned to Zed commit
69e2130295c2649963eb639fc70b4f2ee8ea1624in workspace patch configuration. - Update only by intentional SHA bumps.
Linux GPU note
- GPUI with Vulkan generally behaves better than WebKit for open-source NVIDIA users.
- Nouveau may fall back to llvmpipe (software rendering).
- Mesa + AMD/Intel Vulkan is the expected reliable path.
Async bridge pattern
// Dispatch heavy async work to Tokio; await result in GPUI.
let rx = self.bridge.call(load_projects()).unwrap();
cx.spawn(async move |this: WeakEntity<View>, cx: &mut AsyncApp| {
if let Ok(Ok(data)) = rx.await {
this.update(cx, |view, cx| {
view.data = data;
cx.notify();
}).ok();
}
}).detach();
The pattern works because tokio::sync::oneshot::Receiver<T> implements Future and can be awaited from within GPUI's executor.