Plan section 6 step 1. A Cargo workspace of its own under spikes/gpui (own lock, not a member of the root workspace, so the root's lock, deny policy, notices and CI are untouched; it builds into the checkout's target/), on gpui-kit pinned to =0.8.0. No gpui-kit release builds on Rust 1.94 (every gpui-pre 0.3.x calls std::hint::cold_path, stable since 1.95), so the workspace says rust-version 1.95. - shell.sh: the toolchain (1.95.0, 1.94, stable or nightly, all from one pinned fenix), the native libraries, Mesa's lavapipe as the only Vulkan driver, Xvfb, openbox and the X tools, Noto Color Emoji and Noto Sans CJK. - headless.sh: a private Xvfb display with openbox and a private session bus, never the desktop's; headless-wayland.sh: sway's headless backend. - spike-common: CPU by thread group and memory from /proc once a second with the spike's counters (meter), proc-meter and damage-count for programs without a meter (the Slint app), Inter and the emoji/CJK fonts, the client's Lucide icons as GPUI assets, and the BGRA twin of voelin_media::convert::to_rgba. From the interrupted 2026-10-25 attempt, kept; changed here: shell.sh takes 1.94 and nightly from the pinned fenix (the store paths it named were garbage-collected), the README's headless-wayland.sh paragraph (sway, not weston), its fmt command (-p, not --all), its toolchain and nixpkgs lines, and the font docs (GPUI drops Noto Color Emoji from a fallback chain). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.0 KiB
Rust
38 lines
1.0 KiB
Rust
//! Icons for `svg()`: the client's own Lucide SVGs
|
|
//! (`crates/voelin-ui/ui/assets/icons`, Lucide 1.48, read from the checkout
|
|
//! at run time) under `voelin/<name>.svg`, then gpui-kit-assets' complete
|
|
//! Lucide 1.43 catalog under `icons/<name>.svg` (what gpui-component's
|
|
//! `Icon` uses).
|
|
|
|
use std::borrow::Cow;
|
|
use std::path::PathBuf;
|
|
|
|
use gpui_kit::{AssetSource, Result, SharedString};
|
|
|
|
/// The client's icons first, then gpui-kit's catalog.
|
|
pub struct Assets {
|
|
client_icons: PathBuf,
|
|
}
|
|
|
|
impl Default for Assets {
|
|
fn default() -> Self {
|
|
Self {
|
|
client_icons: PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
|
.join("../../../crates/voelin-ui/ui/assets/icons"),
|
|
}
|
|
}
|
|
}
|
|
|
|
impl AssetSource for Assets {
|
|
fn load(&self, path: &str) -> Result<Option<Cow<'static, [u8]>>> {
|
|
if let Some(name) = path.strip_prefix("voelin/") {
|
|
return Ok(std::fs::read(self.client_icons.join(name)).ok().map(Cow::Owned));
|
|
}
|
|
gpui_kit::assets::AllAssets.load(path)
|
|
}
|
|
|
|
fn list(&self, path: &str) -> Result<Vec<SharedString>> {
|
|
gpui_kit::assets::AllAssets.list(path)
|
|
}
|
|
}
|