Desktop app
The primary UI is a Tauri desktop app (apps/desktop/): a native window that renders
the web frontend on top of the daemon. The app is self-contained — chronosd ships
inside the bundle as a sidecar (Tauri externalBin, landing at
Contents/MacOS/chronosd on macOS). The shell starts the daemon if nothing is serving
the dashboard and stops it again on exit; a daemon that was already running is left
alone.
It is a standalone Cargo workspace (its own [workspace] in src-tauri/Cargo.toml),
intentionally excluded from the repo’s main workspace so just ci does not build it.
Install the Tauri CLI once:
cargo install tauri-cli --version "^2" # provides the `cargo tauri` subcommandPlatform webview requirements: macOS uses the system WebKit, Windows needs WebView2, Linux needs webkit2gtk.
Generate the real app icons from the brand asset (once):
cd apps/desktop/src-tauricargo tauri icon ../../../res/logo_app.png # writes icons/ in all required formatsRun and build
Section titled “Run and build”just desktop # dev: prepare-sidecar.sh && cargo tauri devjust desktop-build # distributable .app + .dmg (host arch) # → apps/desktop/src-tauri/target/release/bundle/{macos,dmg}/How it works
Section titled “How it works”prepare-sidecar.sh builds chronosd in release mode and stages it at
src-tauri/binaries/chronosd-<triple>. Tauri bundles that binary into the .app and
places it next to the dev binary for cargo tauri dev, so the shell always finds its
sidecar first.
At startup, src-tauri/src/main.rs resolves the daemon (sidecar → PATH → workspace
target/), spawns it if the dashboard port is not serving, waits for the port, and
opens a native window on the loopback dashboard (http://127.0.0.1:4173). On exit it
terminates only the daemon it spawned — graceful signal first, hard kill as a
backstop — and never touches one that was already running.
Release builds
Section titled “Release builds”The release pipeline builds Chronos-<version>-<target>.dmg for both macOS
architectures (see Releasing). Builds are unsigned unless
the codesign secrets are present — first launch of an unsigned app needs right-click →
Open, or:
xattr -dr com.apple.quarantine /Applications/Chronos.appPlanned next steps
Section titled “Planned next steps”- Talk to the daemon directly from the Tauri Rust backend over IPC (the
chronos-contractsocket) instead of the loopback HTTP gateway. - Bundle the frontend as a built
frontendDistinstead of loading it over loopback, and adoptpackages/ui(React) when it lands.