From 3f1686eb0c8c8a02c4612dc9aa2cc2d11dc1f0de Mon Sep 17 00:00:00 2001 From: galister <22305755+galister@users.noreply.github.com> Date: Wed, 25 Nov 2026 09:29:49 +0900 Subject: [PATCH] cleanup unused features --- .github/workflows/build-default.yml | 2 +- Cargo.lock | 1 - wayvr/Cargo.toml | 34 ++++++++++------------------- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-default.yml b/.github/workflows/build-default.yml index b8ef185b..b4c40769 100644 --- a/.github/workflows/build-default.yml +++ b/.github/workflows/build-default.yml @@ -29,7 +29,7 @@ jobs: - name: Cache Rust dependencies uses: Swatinem/rust-cache@v2 - name: Check Features - run: cargo hack check --workspace --feature-powerset --no-dev-deps --at-least-one-of=openvr,openxr --keep-going + run: cargo hack check --feature-powerset --no-dev-deps --depth 4 --at-least-one-of=openvr,openxr --exclude-features=pipewire,feat-monado-metrics,default --keep-going - name: Build run: cargo build --verbose - name: Run clippy diff --git a/Cargo.lock b/Cargo.lock index 37c42584..cda1087d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6349,7 +6349,6 @@ dependencies = [ "wayvr-ipc", "wgui", "whisper-rs", - "winit", "wlx-capture", "wlx-common", "xcb", diff --git a/wayvr/Cargo.toml b/wayvr/Cargo.toml index e6260984..a1e8c98a 100644 --- a/wayvr/Cargo.toml +++ b/wayvr/Cargo.toml @@ -19,6 +19,17 @@ categories = ["games"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[features] +default = ["openvr", "openxr", "osc", "wayland", "whisper", "x11"] +feat-monado-metrics = [] +openvr = ["dep:json", "dep:ovr_overlay"] +openxr = ["dep:libmonado", "dep:openxr", "dep:prost"] +osc = ["dep:rosc"] +pipewire = ["wlx-capture/pipewire"] +wayland = ["pipewire", "wlx-capture/wlr", "xkbcommon/wayland"] +whisper = ["dep:calloop", "dep:calloop-wayland-source", "dep:pipewire", "dep:whisper-rs"] +x11 = ["dep:xcb", "wlx-capture/xshm", "xkbcommon/x11"] + [dependencies] dash-frontend = { path = "../dash-frontend/" } wayvr-ipc = { path = "../wayvr-ipc", default-features = false } @@ -54,7 +65,6 @@ wayland-client = { workspace = true } wayland-protocols = { workspace = true, features = ["server", "staging"] } wayland-protocols-misc = { workspace = true } wayland-scanner = "0.31.10" -winit = { workspace = true, optional = true } xdg.workspace = true bytes = { workspace = true } @@ -106,13 +116,7 @@ sysinfo = { version = "0.39.6" } thiserror = "2.0.18" tracing = "0.1.44" whisper-rs = { version = "0.16.0", features = ["vulkan"], optional = true } -xcb = { - version = "1.7.0", - features = [ - "as-raw-xcb-connection", - ], - optional = true -} +xcb = { version = "1.7.0", features = ["as-raw-xcb-connection"], optional = true } xkbcommon = { version = "0.8.0" } # 0.9.0 breaks keymap import on some distros calloop = { version = "0.14.4", optional = true } @@ -122,17 +126,3 @@ evdev = "0.13.2" [build-dependencies] regex.workspace = true shaderc = "0.8" - -[features] -default = ["openvr", "openxr", "osc", "wayland", "whisper", "x11"] -as-raw-xcb-connection = [] -feat-monado-metrics = [] -openvr = ["dep:json", "dep:ovr_overlay"] -openxr = ["dep:libmonado", "dep:openxr", "dep:prost"] -osc = ["dep:rosc"] -pipewire = ["wlx-capture/pipewire"] -uidev = ["dep:winit"] -wayland = ["pipewire", "wlx-capture/wlr", "xkbcommon/wayland"] -whisper = ["dep:calloop", "dep:calloop-wayland-source", "dep:pipewire", "dep:whisper-rs"] -x11 = ["dep:xcb", "wlx-capture/xshm", "xkbcommon/x11"] -xcb = ["dep:xcb"]