From c424c03e34d4e7ce14530dd82a05ceb5cfd65497 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 19:13:13 -0700 Subject: [PATCH] build(bar): enable eframe's wgpu feature for the Windows bar komorebi-bar gets a second renderer, wgpu, for machines without OpenGL 2.0 (the Windows e2e guest is one: egui_glow refuses its generic OpenGL 1.1). wgpu draws through Direct3D 12 on Windows, which has the software adapter WARP, so it needs no driver. The feature is on only in the `[target.cfg(windows)]` table of komorebi-bar, so the macOS bar and the shared bar-core are untouched and nothing here compiles for them. Cargo.lock gains exactly one entry, `pollster` 0.4.0 (eframe's optional block_on helper) and two dependency lines of eframe and nothing else: the wgpu stack (wgpu 27, naga, wgpu-hal, egui-wgpu, ash, gpu-allocator ...) was already locked as optional dependencies. pollster was not in the offline registry, so `cargo metadata` fetched it from crates.io; no other version changed. Cost measured with `cargo tree -e normal --target x86_64-pc-windows-msvc -p komorebi-bar`: 622 -> 664 distinct crate versions (+42) for the Windows bar. With both features compiled, eframe's default renderer becomes Wgpu, so the next revision names the renderer explicitly. Verified: lock diff reviewed; not built yet (the next revision builds). --- Cargo.lock | 8 ++++++++ komorebi-bar/Cargo.toml | 3 +++ 2 files changed, 11 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index c051a910..07f6653e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1728,6 +1728,7 @@ dependencies = [ "objc2-foundation 0.2.2", "parking_lot 0.12.5", "percent-encoding", + "pollster", "profiling", "raw-window-handle", "static_assertions", @@ -1735,6 +1736,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "web-time", + "wgpu", "windows-sys 0.61.2", "winit", ] @@ -5771,6 +5773,12 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "pollster" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" + [[package]] name = "portable-atomic" version = "1.15.0" diff --git a/komorebi-bar/Cargo.toml b/komorebi-bar/Cargo.toml index 74b6b1da..dae5406e 100644 --- a/komorebi-bar/Cargo.toml +++ b/komorebi-bar/Cargo.toml @@ -40,6 +40,9 @@ tracing-subscriber = { workspace = true } [target.'cfg(windows)'.dependencies] komorebi-themes = { path = "../komorebi-themes", default-features = false } egui_extras = { workspace = true } +# a second renderer, wgpu (Direct3D 12, which has the software adapter WARP), for a machine where OpenGL 2.0 is not +# there; glow stays the first (see `renderer_attempts` in windows/mod.rs). Windows only: the macOS bar has no use for it +eframe = { workspace = true, features = ["wgpu"] } netdev = "0.46" regex = "1" sysinfo = { workspace = true }