diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6d4e8e5ddca..61fb36f7955 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -61,7 +61,7 @@ jobs: run: cargo check --locked --no-default-features --lib --all-targets -p epaint - name: check eframe --no-default-features - run: cargo check --locked --no-default-features --lib --all-targets -p eframe + run: cargo check --locked --no-default-features --features x11 --lib --all-targets -p eframe - name: Test doc-tests run: cargo test --doc --all-features diff --git a/crates/eframe/Cargo.toml b/crates/eframe/Cargo.toml index 87ad0a2d760..81b36d82a26 100644 --- a/crates/eframe/Cargo.toml +++ b/crates/eframe/Cargo.toml @@ -27,7 +27,14 @@ targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] [features] -default = ["accesskit", "default_fonts", "glow"] +default = [ + "accesskit", + "default_fonts", + "glow", + "wayland", + "winit/default", + "x11", +] ## Enable platform accessibility API implementations through [AccessKit](https://accesskit.dev/). accesskit = ["egui/accesskit", "egui-winit/accesskit"] @@ -42,6 +49,9 @@ glow = ["dep:glow", "dep:egui_glow", "dep:glutin", "dep:glutin-winit"] ## Enables wayland support and fixes clipboard issue. wayland = ["egui-winit/wayland"] +## Enables compiling for x11. +x11 = ["egui-winit/x11"] + ## Enable saving app state to disk. persistence = [ "directories-next", @@ -109,7 +119,7 @@ image = { version = "0.24", default-features = false, features = [ "png", ] } # Needed for app icon raw-window-handle = { version = "0.5.0" } -winit = "0.28.1" +winit = { version = "0.28.1", default-features = false } # optional native: directories-next = { version = "2", optional = true } diff --git a/crates/egui-wgpu/Cargo.toml b/crates/egui-wgpu/Cargo.toml index 7fc095b2d44..d1812dcb05a 100644 --- a/crates/egui-wgpu/Cargo.toml +++ b/crates/egui-wgpu/Cargo.toml @@ -50,7 +50,7 @@ wgpu = "0.16.0" ## Enable this when generating docs. document-features = { version = "0.2", optional = true } -winit = { version = "0.28", optional = true } +winit = { version = "0.28", default-features = false, optional = true } # Native: [target.'cfg(not(target_arch = "wasm32"))'.dependencies] diff --git a/crates/egui-winit/Cargo.toml b/crates/egui-winit/Cargo.toml index bf3f128f3e3..27a456da964 100644 --- a/crates/egui-winit/Cargo.toml +++ b/crates/egui-winit/Cargo.toml @@ -18,7 +18,7 @@ all-features = true [features] -default = ["clipboard", "links", "wayland", "winit/default"] +default = ["clipboard", "links", "wayland", "winit/default", "x11"] ## Enable platform accessibility API implementations through [AccessKit](https://accesskit.dev/). accesskit = ["accesskit_winit", "egui/accesskit"] @@ -42,6 +42,9 @@ serde = ["egui/serde", "dep:serde"] ## Enables Wayland support. wayland = ["winit/wayland"] +## Enables compiling for x11. +x11 = ["winit/x11"] + # Allow crates to choose an android-activity backend via Winit # - It's important that most applications should not have to depend on android-activity directly, and can # rely on Winit to pull in a suitable version (unlike most Rust crates, any version conflicts won't link)