every.channel/evolution/proposals/ECP-0097-tauri-desktop-bundle-boot-via-relative-assets-and-custom-protocol.md

1.7 KiB

ECP-0097: Tauri Desktop Bundle Boot via Relative Assets and Custom Protocol

Status: Proposed

Decision

Make the Tauri desktop frontend boot from bundled assets reliably by:

  • building the Tauri UI with relative Trunk asset URLs
  • exposing the standard custom-protocol cargo feature so direct Cargo runs can load bundled assets instead of the dev server URL
  • showing a minimal boot-status overlay until the Dioxus app mounts, so startup failures are no longer silent blank windows

Motivation

The desktop shell was starting as a blank window even though the frontend bundle itself rendered correctly over HTTP. Two separate issues caused that failure mode:

  • the Trunk bundle used root-absolute asset paths, which are fragile for desktop asset loading
  • cargo run without the Tauri custom-protocol feature followed the dev-server path instead of the bundled dist/ assets

This made local desktop verification ambiguous and hid useful error information from operators.

Scope

In scope:

  • Tauri UI bundling for desktop
  • direct Cargo run behavior for the desktop app
  • a minimal visible frontend boot diagnostic

Out of scope:

  • redesigning the viewer UI
  • changing the web deployment path for non-Tauri surfaces
  • full developer tooling around webview devtools

Alternatives Considered

  • Keep root-absolute Trunk paths and require cargo tauri dev only. Rejected because desktop bundle verification remains fragile and blank-window failures remain opaque.
  • Add only the boot overlay. Rejected because diagnostics help, but the bundle/load path still needs correction.

Rollout / Reversibility

  • The change is local to the Tauri desktop app.
  • Roll back by restoring the prior Trunk public URL and removing the package feature / boot overlay.