voelin-gpui: the GPUI front end's crate on gpui-kit 0.8.1, a window titled Voelin that opens and closes
The second front end of plan section 6 step 3: crates/voelin-gpui with the binary voelin-gpui, in the workspace's members and default-members next to voelin-ui (two binaries until parity; voelin-ui stays the app). gpui-kit is a workspace dependency pinned `=0.8.1` (the version the three spikes were rebuilt on in the commit before). The crate asks for gpui-kit and the app's name and id from voelin-platform (APP_NAME as the window's title, APP_ID as its app id); `run()` opens one window whose `on_window_should_close` ends the app, and returns the error when the window cannot be opened (no display). Checked on Xvfb :97 (headless.sh: openbox, a private bus, lavapipe through wgpu's Vulkan backend, state under .scratch): the debug binary opens a window named "Voelin" (xdotool search) in 0.3 s and ends with exit code 0 when openbox sends the close request (Alt+F4). Cargo.lock: 279 more package entries (208 new names; no existing version moved, other versions of 61 names were added beside theirs): GPUI's gpui-pre family, wgpu 30, gpui-component with its Markdown, HTML, chart and table support, cosmic-text, the Linux platform crates. The root workspace already carried Slint's and the codecs' dependencies, so this is 195 new packages on Linux, not the ~1,000 of the spikes' lock (which has the root's packages too). deny.toml and about.toml name the two licences no crate of the tree had: 0BSD (enum-iterator and enum-iterator-derive, under gpui-component) and CC0-1.0 (notify 8, the file watcher of gpui-component, and tiny-keccak, under the X input method client of gpui-pre-linux); no other licence, no advisory, no ban and no source is new (`cargo deny --locked --workspace check`: advisories, bans, licenses and sources ok). THIRD_PARTY_NOTICES.md is regenerated (scripts/notices.sh, cargo-about 0.9.2, no warning; `--check` clean). There is no new clarification: cargo-about finds every text. Docs: CHANGELOG, docs/ui.md (the structure tree names the crate and the intro the second front end), docs/building.md (the dependency list: Vulkan or OpenGL at run time, what GPUI loads by name, a window manager on X11; no new development package), README (the crate list and the run command) and CLAUDE.md, which had no crate sentence (it only says "own crates"): it now says there are two front ends on one engine and what they share. Checked on Rust 1.95.0: cargo fmt and cargo clippy -D warnings --no-deps over the own crates (all targets); cargo deny; scripts/notices.sh --check. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6fc84e9e44
commit
8f234e0051
13 files changed
+6920
-171
No files matched your search
@@ -8,6 +8,12 @@ User-visible changes of the apps and the `tsgw` gateway. The format follows
|
||||
|
||||
### Added
|
||||
|
||||
- `voelin-gpui`, the GPUI front end of the desktop app, in its first form: a
|
||||
window titled Voelin that opens and closes (`cargo run -p voelin-gpui
|
||||
--release`). The Slint app (`voelin`) is unchanged and stays the app; both run
|
||||
on the same engine until the GPUI one reaches parity (docs/ui.md). It needs
|
||||
Vulkan or OpenGL at run time (Mesa's lavapipe renders in software); no
|
||||
package ships it yet.
|
||||
- Log files: each run logs to `<state>/voelin/logs/voelin.log`, the previous
|
||||
four runs are kept; `VOELIN_LOG` sets what is logged. Settings → Advanced
|
||||
opens the folder.
|
||||
|
||||
@@ -8,6 +8,12 @@ org `Voelin`; the current plan lives in the approved plan file referenced in
|
||||
`cargo fmt` (hard tabs, `rustfmt.toml`) and `cargo clippy -D warnings` on the
|
||||
project's own crates (`scripts/own-crates.sh`) green.
|
||||
|
||||
Two front ends run on one engine until the second reaches parity:
|
||||
`crates/voelin-ui` (Slint, the `voelin` binary, the app today) and
|
||||
`crates/voelin-gpui` (GPUI on an exactly pinned `gpui-kit`, the `voelin-gpui`
|
||||
binary, under construction); `crates/voelin-ui-vm` holds what they share, the
|
||||
view models and the state, with no UI toolkit (`docs/ui.md`).
|
||||
|
||||
## Hosting: Gitea, not GitHub
|
||||
|
||||
- The source of truth is **https://git.faumaray.com** (Gitea). Pull requests,
|
||||
|
||||
Generated
+3521
-126
File diff suppressed because it is too large.
Load diff
@@ -15,6 +15,7 @@ members = [
|
||||
"crates/voelin-core",
|
||||
"crates/voelin-gateway",
|
||||
"crates/voelin-gateway-proto",
|
||||
"crates/voelin-gpui",
|
||||
"crates/voelin-media",
|
||||
"crates/voelin-observer",
|
||||
"crates/voelin-platform",
|
||||
@@ -36,6 +37,7 @@ default-members = [
|
||||
"crates/voelin-core",
|
||||
"crates/voelin-gateway",
|
||||
"crates/voelin-gateway-proto",
|
||||
"crates/voelin-gpui",
|
||||
"crates/voelin-observer",
|
||||
"crates/voelin-platform",
|
||||
"crates/voelin-query",
|
||||
@@ -66,6 +68,11 @@ voelin-identity = { git = "ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.gi
|
||||
voelin-proto = { git = "ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git", rev = "c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562" }
|
||||
# The UI-facing domain model and the client's replica of v1 entities.
|
||||
voelin-model = { git = "ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git", rev = "c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562" }
|
||||
# GPUI, gpui-component and their assets for the GPUI front end (voelin-gpui). Pre-1.0:
|
||||
# pinned exactly (it pins its `gpui-pre` snapshot exactly too), upgraded in commits of
|
||||
# their own after rebuilding spikes/gpui on the new release (docs/design/gpui-spikes.md,
|
||||
# "The version to pin").
|
||||
gpui-kit = "=0.8.1"
|
||||
|
||||
[workspace.lints.rust]
|
||||
# deny, not forbid: generated code (Slint) needs a local allow.
|
||||
|
||||
@@ -48,6 +48,9 @@ Done so far (milestones M0–M4 and the first part of M5 of [the plan](docs/arch
|
||||
- `crates/voelin-ui-vm`: the view models and the app's state behind the UI, with no UI toolkit: engine state
|
||||
as plain rows and forms, chat formatting, the Twemoji archive, and what the settings pages and the
|
||||
Stream Studio decide; `voelin-ui` puts them on Slint windows ([docs/ui.md](docs/ui.md))
|
||||
- `crates/voelin-gpui` (`voelin-gpui`): the GPUI front end, under construction, on the same engine and
|
||||
view models as the Slint one, which stays the app until it reaches parity (a window that opens and
|
||||
closes so far; [docs/ui.md](docs/ui.md))
|
||||
- `crates/voelin-stream`: TeamSpeak 6 streams: stream commands and notifications, JSON signalling,
|
||||
WebRTC peers (str0m) with host and STUN candidates. A live test streams VP8 + Opus between two
|
||||
clients through a TS6 server
|
||||
@@ -79,6 +82,8 @@ The UI (design system, desktop and phone layouts, emoji, how to add a screen) is
|
||||
```sh
|
||||
# Desktop app
|
||||
cargo run -p voelin-ui --bin voelin
|
||||
# The GPUI front end, under construction (Vulkan or OpenGL at run time)
|
||||
cargo run -p voelin-gpui --release
|
||||
|
||||
# Local servers (use REGISTRY=mirror.gcr.io if Docker Hub rate-limits you)
|
||||
docker compose -f dev/docker-compose.yml up -d
|
||||
|
||||
+3246
-44
File diff suppressed because it is too large.
Load diff
@@ -23,6 +23,10 @@ accepted = [
|
||||
"LicenseRef-Slint-Royalty-free-2.0",
|
||||
# libbz2-rs-sys (unpacks Cisco's OpenH264 download in voelin-media).
|
||||
"bzip2-1.0.6",
|
||||
# The GPUI front end: 0BSD (enum-iterator, enum-iterator-derive) and CC0-1.0
|
||||
# (notify 8, tiny-keccak); see deny.toml.
|
||||
"0BSD",
|
||||
"CC0-1.0",
|
||||
]
|
||||
|
||||
# What the apps ship on: the desktop app on Linux (x86_64, and aarch64 for
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
[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 app's name and id (the window's title and its desktop file).
|
||||
voelin-platform = { path = "../voelin-platform", default-features = false }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
@@ -0,0 +1,69 @@
|
||||
//! The GPUI front end of the desktop app, under construction (plan section 6
|
||||
//! of the migration from Slint; docs/ui.md, "The GPUI front end"). The Slint
|
||||
//! front end (`voelin-ui`, the `voelin` binary) stays the app until this one
|
||||
//! reaches parity; both run on the same engine.
|
||||
|
||||
#![warn(missing_docs)]
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
|
||||
use anyhow::{Context as _, Result};
|
||||
use gpui_kit::{
|
||||
App, AppContext as _, Context, Entity, IntoElement, ParentElement as _, Render, Styled as _,
|
||||
TitlebarOptions, Window, WindowOptions, div, px,
|
||||
};
|
||||
|
||||
/// The window's first content: nothing yet.
|
||||
struct Blank;
|
||||
|
||||
impl Render for Blank {
|
||||
fn render(&mut self, _window: &mut Window, _cx: &mut Context<Self>) -> impl IntoElement {
|
||||
div().size_full().child("")
|
||||
}
|
||||
}
|
||||
|
||||
/// The main window's options: titled with the app's name, grouped by its id.
|
||||
fn window_options() -> WindowOptions {
|
||||
WindowOptions {
|
||||
titlebar: Some(TitlebarOptions {
|
||||
title: Some(voelin_platform::APP_NAME.into()),
|
||||
..Default::default()
|
||||
}),
|
||||
app_id: Some(voelin_platform::APP_ID.to_owned()),
|
||||
window_min_size: Some(gpui_kit::size(px(640.0), px(480.0))),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
/// Open the main window; closing it ends the app.
|
||||
fn open_main_window(cx: &mut App) -> Result<Entity<Blank>> {
|
||||
let (_, blank) = gpui_kit::open_window(window_options(), cx, |window, cx| {
|
||||
window.on_window_should_close(cx, |_, cx| {
|
||||
cx.quit();
|
||||
true
|
||||
});
|
||||
cx.new(|_| Blank)
|
||||
})
|
||||
.context("cannot open the main window")?;
|
||||
Ok(blank)
|
||||
}
|
||||
|
||||
/// Run the app on the current thread until its window closes.
|
||||
pub fn run() -> Result<()> {
|
||||
let failure: Rc<RefCell<Option<anyhow::Error>>> = Rc::default();
|
||||
gpui_kit::application().run({
|
||||
let failure = failure.clone();
|
||||
move |cx| {
|
||||
gpui_kit::init(cx);
|
||||
if let Err(e) = open_main_window(cx) {
|
||||
*failure.borrow_mut() = Some(e);
|
||||
cx.quit();
|
||||
}
|
||||
}
|
||||
});
|
||||
match failure.take() {
|
||||
Some(e) => Err(e),
|
||||
None => Ok(()),
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
//! `voelin-gpui`: the GPUI front end of the desktop app (docs/ui.md, "The
|
||||
//! GPUI front end").
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
voelin_gpui::run()
|
||||
}
|
||||
@@ -53,6 +53,16 @@ allow = [
|
||||
# Permissive BSD-style license of bzip2, kept by its pure Rust port
|
||||
# (libbz2-rs-sys), which voelin-media uses to unpack Cisco's OpenH264 download.
|
||||
"bzip2-1.0.6",
|
||||
# The GPUI front end (gpui-kit, crates/voelin-gpui) brought two licences no
|
||||
# other crate of ours has. 0BSD, the BSD Zero Clause License (OSI approved;
|
||||
# MIT without the notice requirement): `enum-iterator` and
|
||||
# `enum-iterator-derive`, under gpui-component. CC0-1.0, Creative Commons
|
||||
# Zero (a public domain dedication; no notice to carry): `notify` 8, the
|
||||
# file watcher of gpui-component, and `tiny-keccak`, a hash of the X input
|
||||
# method client under gpui-pre-linux (`zed-xim`, through `ahash`'s
|
||||
# `const-random`).
|
||||
"0BSD",
|
||||
"CC0-1.0",
|
||||
]
|
||||
confidence-threshold = 0.9
|
||||
|
||||
|
||||
@@ -128,6 +128,14 @@ the proxy is on localhost. If the proxy inspects TLS, set
|
||||
`sudo apt install libasound2-dev libfontconfig1-dev libxkbcommon-dev libvpx-dev libdav1d-dev libpipewire-0.3-dev libspa-0.2-dev libclang-dev cmake dpkg-dev patchelf`,
|
||||
then `cargo build --release --locked -p voelin-ui -p voelin-gateway`
|
||||
and `scripts/package.sh linux`.
|
||||
- **The GPUI front end** (`cargo build -p voelin-gpui --release`, under construction,
|
||||
in no package yet) builds with the same development packages (fontconfig and
|
||||
freetype headers among them). At run time it draws through wgpu: a Vulkan
|
||||
driver (Mesa's RADV, ANV or NVK, NVIDIA's) or OpenGL through EGL, and in a
|
||||
virtual machine or a remote desktop Mesa's lavapipe (`mesa-vulkan-drivers`)
|
||||
in software. It opens `libwayland-client`, `libxkbcommon`, `libxkbcommon-x11`
|
||||
and `libxcb` by name, so a desktop has them already. X11 needs a window
|
||||
manager for fullscreen and close requests.
|
||||
- **Windows:** [packaging/windows/README.md](../packaging/windows/README.md)
|
||||
(MSVC, vcpkg libvpx and dav1d, NSIS), then
|
||||
`bash scripts/fetch-ffmpeg-windows.sh ffmpeg && FFMPEG_DLL_DIR=ffmpeg bash scripts/package.sh windows`
|
||||
|
||||
+5
-1
@@ -6,7 +6,9 @@ renderer, the Inter font, Lucide icons and Twemoji; the look follows the
|
||||
design mockups (deep navy panels, a blue accent, a server rail, a top bar, a
|
||||
sidebar with the user card, an optional right panel). What its screens show
|
||||
is made by `crates/voelin-ui-vm`, which knows no UI toolkit ([Two
|
||||
crates](#two-crates)).
|
||||
crates](#two-crates)). `crates/voelin-gpui` is the second front end, on GPUI,
|
||||
under construction and built on the same view models and the same engine; the
|
||||
Slint one stays the app until it reaches parity.
|
||||
|
||||

|
||||
|
||||
@@ -46,6 +48,8 @@ crates/voelin-ui-vm/ view models and state, no UI toolkit
|
||||
the audio settings page (devices, form, microphone test, push to
|
||||
talk), the crash notice and the volume dialog of a client
|
||||
bbcode.rs emoji.rs chat formatting; the Twemoji archive, text → runs of text and emoji
|
||||
crates/voelin-gpui/ the GPUI front end, under construction (binary voelin-gpui; gpui-kit
|
||||
pinned exactly); it uses voelin-ui-vm and the engine, not voelin-ui
|
||||
crates/voelin-ui/ the Slint front end
|
||||
ui/
|
||||
app.slint MainWindow: picks the shell, puts the page's screens in it, dialogs
|
||||
|
||||
Reference in new issue
Block a user