diff --git a/crates/egui_glow/Cargo.toml b/crates/egui_glow/Cargo.toml index 6bb081980d3..44939640cfb 100644 --- a/crates/egui_glow/Cargo.toml +++ b/crates/egui_glow/Cargo.toml @@ -54,6 +54,7 @@ x11 = ["winit?/x11"] [dependencies] egui = { workspace = true, default-features = false, features = ["bytemuck"] } +egui-winit = { workspace = true, optional = true, default-features = false } bytemuck = "1.7" glow.workspace = true @@ -66,7 +67,6 @@ document-features = { workspace = true, optional = true } # Native: [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -egui-winit = { workspace = true, optional = true, default-features = false } puffin = { workspace = true, optional = true } winit = { workspace = true, optional = true, default-features = false, features = [ "rwh_06", # for compatibility with egui-winit diff --git a/crates/egui_glow/src/lib.rs b/crates/egui_glow/src/lib.rs index 8621dbd74e7..cfb95acd3d7 100644 --- a/crates/egui_glow/src/lib.rs +++ b/crates/egui_glow/src/lib.rs @@ -21,9 +21,9 @@ mod vao; pub use shader_version::ShaderVersion; -#[cfg(all(not(target_arch = "wasm32"), feature = "winit"))] +#[cfg(feature = "winit")] pub mod winit; -#[cfg(all(not(target_arch = "wasm32"), feature = "winit"))] +#[cfg(feature = "winit")] pub use winit::*; /// Check for OpenGL error and report it using `log::error`.