From 1ffa8254d49850b7e4701273c6f883cb2059bf3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Mockers?= Date: Mon, 24 Mar 2025 00:52:58 +0100 Subject: [PATCH] enable x11 by default in bevy_winit (#18475) # Objective - building bevy_winit on linux fails with ``` error: The platform you're compiling for is not supported by winit --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.9/src/platform_impl/mod.rs:78:1 | 78 | compile_error!("The platform you're compiling for is not supported by winit"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` - this blocks publishing Bevy from linux during the verification step ## Solution - Enable `x11` by default when building bevy_winit, and disable default features of bevy_winit in bevy_internal - This doesn't change anything when depending on Bevy --- crates/bevy_internal/Cargo.toml | 2 +- crates/bevy_winit/Cargo.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index 8a466df199..e659bdc77d 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -429,7 +429,7 @@ bevy_ui = { path = "../bevy_ui", optional = true, version = "0.16.0-dev" } bevy_window = { path = "../bevy_window", optional = true, version = "0.16.0-dev", default-features = false, features = [ "bevy_reflect", ] } -bevy_winit = { path = "../bevy_winit", optional = true, version = "0.16.0-dev" } +bevy_winit = { path = "../bevy_winit", optional = true, version = "0.16.0-dev", default-features = false } [lints] workspace = true diff --git a/crates/bevy_winit/Cargo.toml b/crates/bevy_winit/Cargo.toml index ff888332ab..31dbd63545 100644 --- a/crates/bevy_winit/Cargo.toml +++ b/crates/bevy_winit/Cargo.toml @@ -9,6 +9,7 @@ license = "MIT OR Apache-2.0" keywords = ["bevy"] [features] +default = ["x11"] trace = [] wayland = ["winit/wayland", "winit/wayland-csd-adwaita"] x11 = ["winit/x11"]