diff --git a/Cargo.lock b/Cargo.lock index 417e30b6..9b0feb46 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1349,45 +1349,6 @@ name = "dpi" version = "0.1.1" source = "git+https://github.com/iced-rs/winit.git?rev=05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed#05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed" -[[package]] -name = "drm" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98888c4bbd601524c11a7ed63f814b8825f420514f78e96f752c437ae9cbb5d1" -dependencies = [ - "bitflags 2.10.0", - "bytemuck", - "drm-ffi", - "drm-fourcc", - "rustix 0.38.44", -] - -[[package]] -name = "drm-ffi" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c98727e48b7ccb4f4aea8cfe881e5b07f702d17b7875991881b41af7278d53" -dependencies = [ - "drm-sys", - "rustix 0.38.44", -] - -[[package]] -name = "drm-fourcc" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" - -[[package]] -name = "drm-sys" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd39dde40b6e196c2e8763f23d119ddb1a8714534bf7d77fa97a65b0feda3986" -dependencies = [ - "libc", - "linux-raw-sys 0.6.5", -] - [[package]] name = "editor" version = "0.1.0" @@ -3066,12 +3027,6 @@ version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" -[[package]] -name = "linux-raw-sys" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a385b1be4e5c3e362ad2ffa73c392e53f031eaa5b7d648e64cd87f27f6063d7" - [[package]] name = "linux-raw-sys" version = "0.11.0" @@ -4884,9 +4839,9 @@ dependencies = [ [[package]] name = "rfd" -version = "0.15.4" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2bee61e6cffa4635c72d7d81a84294e28f0930db0ddcb0f66d10244674ebed" +checksum = "a15ad77d9e70a92437d8f74c35d99b4e4691128df018833e99f90bcd36152672" dependencies = [ "ashpd", "block2 0.6.2", @@ -4903,7 +4858,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -5477,7 +5432,6 @@ dependencies = [ "bytemuck", "cfg_aliases", "core-graphics 0.24.0", - "drm", "fastrand", "foreign-types 0.5.0", "js-sys", @@ -7001,9 +6955,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d692d46038c433f9daee7ad8757e002a4248c20b0a3fbc991d99521d3bcb6d" +checksum = "5793d0b08c9e6a1240fe9ab2bd8db277487bf92436fd1a6321861a90a1b0cb7e" dependencies = [ "clipboard-win", "clipboard_macos", diff --git a/Cargo.toml b/Cargo.toml index 7dca04c1..fd201efc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ all-features = true maintenance = { status = "actively-developed" } [features] -default = ["wgpu", "tiny-skia", "crisp", "web-colors", "thread-pool", "linux-theme-detection"] +default = ["wgpu", "tiny-skia", "crisp", "web-colors", "thread-pool", "linux-theme-detection", "x11", "wayland"] # Enables the `wgpu` GPU-accelerated renderer with all its default features (Vulkan, Metal, DX12, OpenGL, and WebGPU) wgpu = ["wgpu-bare", "iced_renderer/wgpu"] # Enables the `wgpu` GPU-accelerated renderer with the minimum required features (no backends!) @@ -85,6 +85,10 @@ unconditional-rendering = ["iced_winit/unconditional-rendering"] sipper = ["iced_runtime/sipper"] # Enables Linux system theme detection linux-theme-detection = ["iced_winit/linux-theme-detection"] +# Enables the Unix X11 backend +x11 = ["iced_renderer/x11", "iced_winit/x11"] +# Enables the Unix Wayland backend +wayland = ["iced_renderer/wayland", "iced_winit/wayland"] [dependencies] iced_debug.workspace = true @@ -176,10 +180,10 @@ iced_runtime = { version = "0.14.0-dev", path = "runtime" } iced_selector = { version = "0.14.0-dev", path = "selector" } iced_test = { version = "0.14.0-dev", path = "test" } iced_tester = { version = "0.14.0-dev", path = "tester" } -iced_tiny_skia = { version = "0.14.0-dev", path = "tiny_skia" } +iced_tiny_skia = { version = "0.14.0-dev", path = "tiny_skia", default-features = false } iced_wgpu = { version = "0.14.0-dev", path = "wgpu", default-features = false } iced_widget = { version = "0.14.0-dev", path = "widget" } -iced_winit = { version = "0.14.0-dev", path = "winit" } +iced_winit = { version = "0.14.0-dev", path = "winit", default-features = false } bincode = "1.3" bitflags = "2.0" @@ -208,7 +212,7 @@ pulldown-cmark = "0.12" qrcode = { version = "0.13", default-features = false } raw-window-handle = "0.6" resvg = "0.45" -rfd = "0.15" +rfd = "0.16" rustc-hash = "2.0" semver = "1.0" serde = "1.0" @@ -216,7 +220,7 @@ sha2 = "0.10" sipper = "0.1" smol = "2" smol_str = "0.2" -softbuffer = "0.4" +softbuffer = { version = "0.4", default-features = false } syntect = "5.1" sysinfo = "0.33" thiserror = "2" @@ -230,7 +234,7 @@ wasmtimer = "0.4.1" web-sys = "0.3.69" web-time = "1.1" wgpu = { version = "27.0", default-features = false, features = ["std", "wgsl"] } -window_clipboard = "0.4.1" +window_clipboard = "0.5" winit = { git = "https://github.com/iced-rs/winit.git", rev = "05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed" } [workspace.lints.rust] diff --git a/renderer/Cargo.toml b/renderer/Cargo.toml index c95cae1b..f025927a 100644 --- a/renderer/Cargo.toml +++ b/renderer/Cargo.toml @@ -24,6 +24,8 @@ web-colors = ["iced_wgpu?/web-colors"] webgl = ["iced_wgpu?/webgl"] fira-sans = ["iced_graphics/fira-sans"] strict-assertions = ["iced_wgpu?/strict-assertions"] +x11 = ["iced_tiny_skia?/x11"] +wayland = ["iced_tiny_skia?/wayland"] [dependencies] iced_graphics.workspace = true diff --git a/src/lib.rs b/src/lib.rs index 13a459c7..111c25e7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -496,6 +496,18 @@ compile_error!( Available options: thread-pool, tokio, or smol." ); +#[cfg(all( + target_family = "unix", + not(target_os = "macos"), + not(feature = "wayland"), + not(feature = "x11"), +))] +compile_error!( + "No Unix display server backend has been enabled. You must enable a \ + display server feature.\n\ + Available options: x11, wayland." +); + #[cfg(feature = "highlighter")] pub use iced_highlighter as highlighter; diff --git a/tiny_skia/Cargo.toml b/tiny_skia/Cargo.toml index 87aa74e5..153bda2c 100644 --- a/tiny_skia/Cargo.toml +++ b/tiny_skia/Cargo.toml @@ -17,6 +17,8 @@ workspace = true image = ["iced_graphics/image"] svg = ["iced_graphics/svg", "resvg"] geometry = ["iced_graphics/geometry"] +x11 = ["softbuffer/x11", "softbuffer/x11-dlopen"] +wayland = ["softbuffer/wayland", "softbuffer/wayland-dlopen"] [dependencies] iced_debug.workspace = true diff --git a/winit/Cargo.toml b/winit/Cargo.toml index ebac340b..cdce9c10 100644 --- a/winit/Cargo.toml +++ b/winit/Cargo.toml @@ -14,15 +14,13 @@ keywords.workspace = true workspace = true [features] -default = ["x11", "wayland", "wayland-dlopen", "wayland-csd-adwaita"] +default = ["x11", "wayland"] debug = ["iced_debug/enable"] sysinfo = ["dep:sysinfo"] -x11 = ["winit/x11"] -wayland = ["winit/wayland"] -wayland-dlopen = ["winit/wayland-dlopen"] -wayland-csd-adwaita = ["winit/wayland-csd-adwaita"] unconditional-rendering = [] linux-theme-detection = ["dep:mundy", "mundy/async-io", "mundy/color-scheme"] +x11 = ["winit/x11", "window_clipboard/x11"] +wayland = ["winit/wayland", "winit/wayland-dlopen", "winit/wayland-csd-adwaita", "window_clipboard/wayland"] [dependencies] iced_debug.workspace = true