GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
refactor: remove the process module and its tokio dependency
spawn_detached, spawn_tracked and cleanup_spawned_processes had no caller
in any crate; the runner's exit-path cleanup drained a list nothing ever
pushed to. tokio was in the manifest only for the detached spawn.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
CLAUDE.md | 4 ---
Cargo.toml | 1 -
src/backend/window_runner.rs | 1 -
src/lib.rs | 1 -
src/process.rs | 60 --------------------------------------------
5 files changed, 67 deletions(-)
diff --git a/CLAUDE.md b/CLAUDE.md
index 9c7a45a..ac8ffef 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -619,10 +619,6 @@ cce-system-interface) to confirm behavior, not just the test suite.
KDL/JSON-driven `json_layout.rs` is dissolved; `scene/layout.rs` is the box model.)
- `protocol.rs` — inline-generated Wayland protocol bindings.
- `ipc.rs` — the `/tmp/<prefix>-<WAYLAND_DISPLAY>.sock` helpers (`socket_path`, `send_command`).
-- `process.rs` — detached/tracked child spawning. (The `cce-cloud` popup pattern
- that lived beside it — `CloudPopup`, `CloudPopupTracker` — was removed on
- 2026-09-28: every app that spawned a popup has an in-process widget for it now,
- and no crate in the workspace called it.)
- `icon.rs` — XDG icon-theme lookup: a `.desktop` `Icon=` key (or an SNI tray icon
name) → a file on disk, plus `upload_themed` to rasterize/decode and upload it.
**Not** `lib.rs`'s `upload_icon`, which loads a *bundled* cce-icons glyph by its
diff --git a/Cargo.toml b/Cargo.toml
index c55f803..53862c3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,7 +23,6 @@ cosmic-text = "=0.12.1"
ash = "0.38"
gpu-allocator = { version = "0.27", default-features = false, features = ["vulkan"] }
naga = { version = "24", features = ["wgsl-in", "spv-out"] }
-tokio = { version = "1", features = ["full"] }
smithay-client-toolkit = { version = "0.19.2", features = ["calloop"] }
calloop = "0.13.0"
calloop-wayland-source = "0.3.0"
diff --git a/src/backend/window_runner.rs b/src/backend/window_runner.rs
index 02c8ac2..7140f24 100644
--- a/src/backend/window_runner.rs
+++ b/src/backend/window_runner.rs
@@ -5871,7 +5871,6 @@ pub fn run<A: Application>() {
if let Some(mut app) = app {
app.on_exit();
}
- crate::process::cleanup_spawned_processes();
}
/// One connection's lifetime: connect, build the surface and renderer, pump
diff --git a/src/lib.rs b/src/lib.rs
index 31659b6..6c60d1a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -13,7 +13,6 @@ pub mod units;
pub mod backend;
pub mod context;
pub mod scene;
-pub mod process;
pub mod file_dialog;
pub mod icon;
pub mod ipc;
diff --git a/src/process.rs b/src/process.rs
deleted file mode 100644
index 9851e38..0000000
--- a/src/process.rs
+++ /dev/null
@@ -1,60 +0,0 @@
-use std::process::Command;
-use std::sync::Mutex;
-
-static TRACKED_PROCESSES: Mutex<Vec<std::process::Child>> = Mutex::new(Vec::new());
-
-/// Spawns a process detached and automatically reaps it when it exits.
-///
-/// If an active Tokio runtime is available, it will use a background Tokio task
-/// to wait on the process. Otherwise, it will fallback to a background OS thread.
-pub fn spawn_detached(mut cmd: Command) -> std::io::Result<()> {
- if let Ok(handle) = tokio::runtime::Handle::try_current() {
- let mut tokio_cmd = tokio::process::Command::from(cmd);
- let mut child = tokio_cmd.spawn()?;
- handle.spawn(async move {
- let _ = child.wait().await;
- });
- } else {
- let mut child = cmd.spawn()?;
- std::thread::spawn(move || {
- let _ = child.wait();
- });
- }
- Ok(())
-}
-
-/// Spawns a process and registers it to be automatically killed when the application exits.
-pub fn spawn_tracked(mut cmd: Command) -> std::io::Result<()> {
- let child = cmd.spawn()?;
- if let Ok(mut lock) = TRACKED_PROCESSES.lock() {
- lock.push(child);
- }
- Ok(())
-}
-
-/// Kills all spawned and tracked child processes. Called automatically on application exit.
-pub fn cleanup_spawned_processes() {
- if let Ok(mut lock) = TRACKED_PROCESSES.lock() {
- for mut child in lock.drain(..) {
- let _ = child.kill();
- }
- }
-}
-
-#[cfg(test)]
-mod tests {
- use super::*;
-
- #[test]
- fn test_spawn_detached() {
- let cmd = Command::new("true");
- assert!(spawn_detached(cmd).is_ok());
- }
-
- #[test]
- fn test_spawn_tracked() {
- let cmd = Command::new("true");
- assert!(spawn_tracked(cmd).is_ok());
- cleanup_spawned_processes();
- }
-}