Some checks are pending
Audit / vulnerabilities (push) Waiting to run
Check / wasm (push) Waiting to run
Check / widget (push) Waiting to run
Document / all (push) Waiting to run
Format / all (push) Waiting to run
Lint / all (push) Waiting to run
Test / all (macOS-latest, 1.88) (push) Waiting to run
Test / all (macOS-latest, beta) (push) Waiting to run
Test / all (macOS-latest, stable) (push) Waiting to run
Test / all (ubuntu-latest, 1.88) (push) Waiting to run
Test / all (ubuntu-latest, beta) (push) Waiting to run
Test / all (ubuntu-latest, stable) (push) Waiting to run
Test / all (windows-latest, 1.88) (push) Waiting to run
Test / all (windows-latest, beta) (push) Waiting to run
Test / all (windows-latest, stable) (push) Waiting to run
iced_wgpu's unix block unconditionally depended on as-raw-xcb-connection, tiny-xlib and x11rb for a DRI3 device-id fallback in window/compositor.rs that only fires when wayland can't determine the GPU. On a Wayland-only build this code path never runs, so the deps are pure bloat. Changes: - Cargo.toml: move the 3 x11 crates to optional + new feature `x11` (not in default — wayland-only is the yoda target; users who need X11 opt in). - window.rs: cfg-gate `mod x11;` on feature = "x11" - window/compositor.rs: cfg-gate `use super::x11::get_x11_device_ids` + the or_else fallback on feature = "x11" (wrapped in a let-binding so the non-x11 branch compiles cleanly). Result: iced_wgpu no longer pulls any x11 crate when built without the feature.
72 lines
2 KiB
TOML
72 lines
2 KiB
TOML
[package]
|
|
name = "iced_wgpu"
|
|
description = "A renderer for iced on top of wgpu"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
authors.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
homepage.workspace = true
|
|
categories.workspace = true
|
|
keywords.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[package.metadata.docs.rs]
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
|
all-features = true
|
|
|
|
[features]
|
|
default = ["wgpu/default"]
|
|
geometry = ["iced_graphics/geometry", "lyon"]
|
|
image = ["iced_graphics/image"]
|
|
svg = ["iced_graphics/svg", "resvg/text"]
|
|
web-colors = ["iced_graphics/web-colors"]
|
|
webgl = ["wgpu/webgl"]
|
|
strict-assertions = []
|
|
# Yoda: opt-in X11 backend. Pulls tiny-xlib/as-raw-xcb-connection/x11rb
|
|
# (which otherwise were unconditional direct deps on unix). Wayland-only
|
|
# builds just leave this off — window/x11.rs and the DRI3 device-id
|
|
# fallback in window/compositor.rs are cfg-gated on it.
|
|
x11 = ["dep:as-raw-xcb-connection", "dep:tiny-xlib", "dep:x11rb"]
|
|
|
|
[dependencies]
|
|
iced_debug.workspace = true
|
|
iced_graphics.workspace = true
|
|
|
|
bitflags.workspace = true
|
|
bytemuck.workspace = true
|
|
futures.workspace = true
|
|
glam.workspace = true
|
|
cryoglyph.workspace = true
|
|
guillotiere.workspace = true
|
|
log.workspace = true
|
|
rustc-hash.workspace = true
|
|
thiserror.workspace = true
|
|
wgpu.workspace = true
|
|
|
|
lyon.workspace = true
|
|
lyon.optional = true
|
|
|
|
resvg.workspace = true
|
|
resvg.optional = true
|
|
|
|
[target.'cfg(all(unix, not(target_os = "macos"), not(target_os = "redox")))'.dependencies]
|
|
|
|
rustix = { version = "0.38", features = ["fs"] }
|
|
raw-window-handle.workspace = true
|
|
cctk.workspace = true
|
|
cctk.optional = true
|
|
wayland-protocols.workspace = true
|
|
wayland-backend = { version = "0.3.3", features = ["client_system"] }
|
|
wayland-client = { version = "0.31.2" }
|
|
wayland-sys = { version = "0.31.1", features = ["dlopen"] }
|
|
as-raw-xcb-connection = { version = "1.0.1", optional = true }
|
|
tiny-xlib = { version = "0.2.3", optional = true }
|
|
x11rb = { version = "0.13.1", optional = true, features = [
|
|
"allow-unsafe-code",
|
|
"dl-libxcb",
|
|
"dri3",
|
|
"randr",
|
|
] }
|