From fd4959ae6d32856d68c2c80b32549fb1ef4bb272 Mon Sep 17 00:00:00 2001 From: Ygor Souza Date: Thu, 20 Jun 2024 20:14:55 +0200 Subject: [PATCH] Fix hello_world_par example on Linux This example does not use the default features from eframe in order to avoid accesskit, which panics when run from multiple threads, so it must manually enable the other default features in order to compile correctly on Linux. --- Cargo.lock | 1 + examples/hello_world_par/Cargo.toml | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 1cfa6c70ba4..125af9adedf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2000,6 +2000,7 @@ version = "0.1.0" dependencies = [ "eframe", "env_logger", + "winit", ] [[package]] diff --git a/examples/hello_world_par/Cargo.toml b/examples/hello_world_par/Cargo.toml index e64cdd36108..a64e7c0e9b0 100644 --- a/examples/hello_world_par/Cargo.toml +++ b/examples/hello_world_par/Cargo.toml @@ -15,9 +15,16 @@ workspace = true eframe = { workspace = true, default-features = false, features = [ # accesskit struggles with threading "default_fonts", + "wayland", + "x11", "wgpu", ] } env_logger = { version = "0.10", default-features = false, features = [ "auto-color", "humantime", ] } +# This is normally enabled by eframe/default, which is not being used here +# because of accesskit, as mentioned above +winit = { workspace = true, features = [ + "default" +] }