The window opens the client's store as the Slint front end's run() does (backend.rs): the database in the platform's data directory (VOELIN_DATA_DIR moves it), the settings service on it with the UI's keys, the secrets (the OS keyring, memory when it refuses), the default identity (made and kept when the store has none), the chat history and the settings handed to the engine. The state starts from the store's bookmarks, the settings' theme and text size (a development switch still wins), and the sample servers of VOELIN_DEMO_UI through the app's own events with nothing sent to the engine or kept. AppState gains the callbacks of bind/servers.rs that the shell has: select a server (and observe it through its gateway or query login, the gateway looked up on the engine's runtime and handed back through Later), connect and disconnect voice, mute the microphone and the sound, hold to talk, copy an invite, and add, edit, save-and-connect and remove a bookmark, all through voelin-ui-vm's logic; perform() carries out an Update as far as this front end has the parts (commands, status, what to keep, the theme settings). It keeps the window's place in ui.window at the tick and at close, and opens the window where it was left if a screen still shows its corner. The engine-event task takes what is queued (BATCH, 64) in one update with one notification and yields to GPUI's executor between steps; the tick counts and notifies nobody, since nothing the shell shows moves with the clock. Tests: one per behaviour on GPUI's test platform (the store's servers, select, save, edit, remove, connect, the other commands, observe, the sample servers, the theme settings, the window's place, the burst and the quiet tick), and a connect through a real engine with no connector, which answers that none serves the address. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
57 lines
2.4 KiB
TOML
57 lines
2.4 KiB
TOML
[package]
|
|
name = "voelin-gpui"
|
|
version = "0.0.1-alpha"
|
|
description = "The GPUI front end of the desktop app, under construction: it runs on the same engine as the Slint front end (voelin-ui) until it reaches parity."
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
publish.workspace = true
|
|
|
|
[lib]
|
|
name = "voelin_gpui"
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "voelin-gpui"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
anyhow = "1.0.104"
|
|
# GPUI, gpui-component and gpui-kit-assets behind one pinned dependency.
|
|
gpui-kit = { workspace = true }
|
|
# The engine's runtime and the channel of its events (a tokio receiver needs no
|
|
# reactor, so GPUI's executor can await it).
|
|
tokio = { version = "1.53.1", features = ["rt-multi-thread", "sync", "time"] }
|
|
tracing = "0.1.44"
|
|
tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }
|
|
# The TeamSpeak identity a connection is made with (the store hands it out).
|
|
tsclientlib = { path = "../proto/tsclientlib" }
|
|
# The engine, with the desktop's capture and codecs: ashpd on async-io (the
|
|
# commit that moved voelin-media and voelin-platform to it) lets this binary
|
|
# hold both the portals and gpui-kit.
|
|
voelin-core = { path = "../voelin-core", default-features = false, features = ["audio-device", "media-desktop"] }
|
|
# The app's name and id, the hotkeys and portals of the slices to come.
|
|
voelin-platform = { path = "../voelin-platform" }
|
|
# The client's database (bookmarks, identities, settings, chat reads) and the
|
|
# secrets: the OS keyring, as the Slint front end keeps them.
|
|
voelin-store = { path = "../voelin-store", features = ["keyring"] }
|
|
# The view models and the state, shared with the Slint front end.
|
|
voelin-ui-vm = { path = "../voelin-ui-vm" }
|
|
|
|
# The meter reads /proc/self (CPU ticks per second, the page size).
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
rustix = { version = "1.1.5", features = ["param"] }
|
|
|
|
[dev-dependencies]
|
|
# GPUI's test platform (`#[gpui::test]`, `TestAppContext`): the front end's tests
|
|
# need no display. gpui-kit's own `test-support` feature is not used: it names
|
|
# the optional `gpui-fast` backend in weak features, which puts gpui-fast and
|
|
# its tree into Cargo.lock and pins taffy to 0.15.0 for every build. gpui-kit
|
|
# pins `gpui-pre` exactly, so this line moves with its `=` pin (a mismatch does
|
|
# not resolve).
|
|
gpui = { package = "gpui-pre", version = "=0.3.10", features = ["test-support"] }
|
|
|
|
[lints]
|
|
workspace = true
|