Tauri 2 shell: verified Linux build and native window

This commit is contained in:
Emil
2026-11-01 01:10:46 +03:00
parent ebdeca3b92
commit 4f4ee05a3a
5 changed files with 43 additions and 32 deletions
+16 -3
View File
@@ -6,6 +6,8 @@ This repository is **P1a**: the engine, the wire, the descent, and the material
![The quarry](preview-p1-quarry.png)
![The Tauri window](preview-tauri.png)
## What is real
- **Rust engine.** `cpal` output at 48 kHz, five veins, a sixteen-step phrase, a fixed voice pool, per-vein levels and gains, a bar clock. Procedural voices for empty pattern rows; real sample voices for rows with a face. No Web Audio.
@@ -16,7 +18,7 @@ This repository is **P1a**: the engine, the wire, the descent, and the material
- **Surface.** A Svelte 5 descent whose terrain, eye, city, road, stones and playhead react to the five levels and the master; a real wire log; engine facts; cilia; a master signal trace; vein gains; transport; keyboard.
- **Verification.** Rust unit tests, a live wire test, a material import test, a browser quarry test and the P0 regression smoke, plus `svelte-check` and a production build.
The Tauri 2 shell is scaffolded in [`app`](app), but **it has not been built on this machine**: the system is missing the GTK/WebKit/dbus development packages and `sudo` requires a password. The exact blocker and the install command are in [`docs/P0.md`](docs/P0.md). The browser surface is the working path.
The Tauri 2 shell is **built and running**: a native window loading the same surface, connected to the daemon. It is built with Tauri 2.12.5 / CLI 2.12.4 against WebKitGTK 2.54.2, GTK 3.24.52 and dbus 1.16.2. The binary is `app/src-tauri/target/release/zhila-app` (13 MB); installers are a later step.
## Quick start
@@ -43,6 +45,17 @@ npm --prefix ui run dev
4. `space` plays the loop; the bass row now triggers the sample while the other veins keep their procedural voices. Edit steps in the pattern; each edit goes to the engine and the journal.
5. Go back to **nave** to see the pattern on the road and the levels in the room.
### Tauri
```bash
npm --prefix ui run build
cd app
./node_modules/.bin/tauri build --no-bundle
./src-tauri/target/release/zhila-app
```
The built window embeds the surface and connects to the daemon at `ws://127.0.0.1:4317`; start the daemon first. `tauri dev` uses the Vite server at `127.0.0.1:5173`. The engine is still the separate daemon in this phase.
Controls: `space` play/stop · `s` strike the selected face in the quarry or the selected vein in the nave · `1`–`5` select a vein (nave) or a pattern row (quarry) · click a face to select, double-click to strike · tempo `−` / `+`.
The daemon prints the audio device, rate, buffer and session id. Use `--no-audio` for UI/protocol tests, `--port` to change the port, and `ZHILA_TOKEN` or `--token` to change the dev token. The surface reads `VITE_ZHILA_WS` and `VITE_ZHILA_TOKEN` at build time.
@@ -57,7 +70,7 @@ crates/zhila-material decode, onset analysis, sixteen faces, peaks
crates/zhila-daemon WebSocket daemon, auth, binary import
ui Svelte 5 surface: descent + quarry
fixtures a small click track for the smoke tests
app Tauri 2 shell (scaffolded; system deps missing)
app Tauri 2 shell (built; engine remains the daemon)
docs plan, protocol, P0/P1 notes
reference/demo the earlier design demo
```
@@ -82,6 +95,6 @@ npm --prefix ui run quarry-smoke # daemon + Vite: import, assign, play, scr
- One fixed two-bar phrase and five veins; pattern rows are veins, one face per row, no per-step face or pitch.
- Formats depend on symphonia; WAV is the tested path. AIFF, multi-channel files and very long files are not specifically handled.
- No agent/MCP in this phase.
- The Tauri shell is not verified; see the blocker.
- The Tauri shell now builds and runs; the engine is still the separate daemon (embedding is next).
The next slice is P1b: a project file and SQLite journal, an asset archive, autosave and reload, undo for pattern edits, recording, and waveform trimming. Then the arrangement and the agent. The plan is in [`docs/PLAN.md`](docs/PLAN.md); the P1a notes are in [`docs/P1.md`](docs/P1.md).
+9 -6
View File
@@ -1,6 +1,6 @@
# ZHILA · Tauri shell
This is the desktop shell for the P0 surface. It is scaffolded and **not yet built** on the development machine: the GTK/WebKit/dbus development packages are missing and `sudo` requires a password.
This is the desktop shell for the ZHILA surface. It is **built and verified** on Fedora (WebKitGTK 2.54.2, GTK 3.24.52, dbus 1.16.2, Tauri 2.12.5 / CLI 2.12.4). The binary is `src-tauri/target/release/zhila-app`.
The shell expects the Vite surface at `http://127.0.0.1:5173` (the `devUrl` in `src-tauri/tauri.conf.json`) and the Rust daemon at `ws://127.0.0.1:4317`. The P0 window does not embed the engine yet.
@@ -36,11 +36,14 @@ npm --prefix app run tauri build -- --bundles deb
The bundle targets are `deb` and `appimage`. The icon at `src-tauri/icons/icon.png` is a P0 placeholder.
## Observed failure before the system packages
## Verified build
```
Package 'dbus-1' was not found in the pkg-config search path.
The system library `dbus-1` required by crate `libdbus-sys` was not found.
```bash
npm --prefix ui run build
cd app
./node_modules/.bin/tauri build --no-bundle
# with the daemon running:
./src-tauri/target/release/zhila-app
```
`pkg-config` also reports missing `webkit2gtk-4.1` and `gtk+-3.0`. The exact `cargo check` output is in `docs/P0.md`.
`cargo check --manifest-path app/src-tauri/Cargo.toml` and the release build pass. The earlier `dbus-1`/`webkit2gtk`/`gtk` pkg-config failure is historical; those packages are installed. The window screenshot is `preview-tauri.png` at the repository root.
+17 -22
View File
@@ -12,7 +12,7 @@ The first phase proves the spine: Rust audio, a session with a journal, a protoc
| Daemon | `zhila-daemon`: WebSocket, hello/token/protocol/origin checks, snapshot, results, broadcast events, 30 Hz binary meters, current-thread Tokio, graceful Ctrl-C |
| Surface | Svelte 5 + Vite: audio-reactive descent, wire log, engine facts, cilia, signal trace, per-vein gain sliders, transport, keyboard |
| Verification | `cargo test`, `cargo clippy`, `svelte-check`, production build, live wire test, browser smoke + screenshots |
| Shell | Tauri 2 scaffold in `app`; build blocked by missing system development packages (below) |
| Shell | Tauri 2 built and launched; native window against the daemon (below) |
## Decisions taken in P0
@@ -23,33 +23,28 @@ The first phase proves the spine: Rust audio, a session with a journal, a protoc
- **The surface is a projection.** The server owns state; the UI applies snapshots, results and events. The canvas owns only its visual phase.
- **Every layer reacts to sound.** The terrain alpha/offset, eye size/glow/rings, city lights, dust, road bands, stone glow, playhead, lane fills, chrome hairlines, cilia, signal trace and master line all read the five vein levels and the master. No decorative animation is independent of the audio.
## Tauri blocker
## Tauri verification (resolved)
`cargo check` in `app/src-tauri` failed on this machine because the GTK/WebKit/dbus development packages are absent and `sudo` needs a password:
The shell was built and launched on 2026-11-01 after the Fedora development packages were installed:
```
Package 'dbus-1' was not found
The system library `dbus-1` required by crate `libdbus-sys` was not found.
```
`pkg-config` also reports missing `webkit2gtk-4.1` and `gtk+-3.0`. The shell is scaffolded, not verified.
Install the Fedora development packages (one command, needs your password):
- webkit2gtk-4.1 **2.54.2**
- gtk+-3.0 **3.24.52**
- dbus-1 **1.16.2**
- javascriptcoregtk-4.1 **2.54.2**
- libsoup-3.0 **3.8.1**
- Tauri **2.12.5** · CLI **2.12.4**
```bash
sudo dnf install dbus-devel webkit2gtk4.1-devel gtk3-devel libappindicator-gtk3-devel \
librsvg2-devel openssl-devel libsoup3-devel javascriptcoregtk4.1-devel pkgconf-pkg-config
```
Then:
```bash
cargo check --manifest-path app/src-tauri/Cargo.toml
npm --prefix ui run build
npm --prefix app run tauri dev # expects the daemon and Vite to be running
cd app
./node_modules/.bin/tauri build --no-bundle
# with the daemon running:
./src-tauri/target/release/zhila-app
```
The Tauri window loads `http://127.0.0.1:5173`; the daemon remains a separate process in P0. Embedding the engine in the Tauri backend is P1 work, after the engine's lifecycle is settled.
`cargo check --manifest-path app/src-tauri/Cargo.toml` and the release build pass. The native window loads the embedded surface, opens the wire (`wire open`, `engine live`), and renders the descent and the engine panel. The screenshot is `preview-tauri.png` at the repository root.
The engine is still the separate daemon: the Tauri shell is a viewer in P0/P1a. Embedding the engine in the Tauri backend is the next step after the session/persistence slice. The earlier `dbus-1`/`webkit2gtk`/`gtk` failure is historical; those packages are now present.
## P0 exit criteria
@@ -57,7 +52,7 @@ The Tauri window loads `http://127.0.0.1:5173`; the daemon remains a separate pr
- Real cpal output with five veins and non-zero meters: **passed** (Default Audio Device, 48 kHz, 256-frame buffer, master peak ~0.45 in the wire test).
- A session that validates and journals project edits: **passed** (Rust tests).
- A surface that visibly reacts to the five levels: **passed** (canvas, cilia, trace, gains; screenshots).
- A Tauri window on Linux: **blocked** by system development packages; the exact command is above.
- A Tauri window on Linux: **passed** on 2026-11-01 (WebKitGTK 2.54.2; screenshot `preview-tauri.png`).
## Next
+1 -1
View File
@@ -48,7 +48,7 @@ The screenshots are `preview-p1-quarry.png`, `preview-p1-nave.png` and the empty
- No undo/redo for pattern edits; the journal is written but not exposed.
- One face per pattern row; no per-step face, pitch or probability yet.
- Formats are whatever symphonia decodes; WAV is the tested path.
- The Tauri shell is still blocked on the system development packages (see `P0.md`).
- The Tauri shell now builds and runs; the engine remains the separate daemon (embedding is next).
## Next
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB