Skip to content

Commit f66651a

Browse files
simon-frankauhacknus
authored andcommitted
Enable egui_glow's winit feature on wasm (emilk#4420) (emilk#4421)
Reverts change in emilk#1303, enabling the egui_glow::winit module when using wasm. * Closes <emilk#4420>
1 parent 19f35fb commit f66651a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/egui_glow/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ x11 = ["winit?/x11"]
5454

5555
[dependencies]
5656
egui = { workspace = true, default-features = false, features = ["bytemuck"] }
57+
egui-winit = { workspace = true, optional = true, default-features = false }
5758

5859
bytemuck = "1.7"
5960
glow.workspace = true
@@ -66,7 +67,6 @@ document-features = { workspace = true, optional = true }
6667

6768
# Native:
6869
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
69-
egui-winit = { workspace = true, optional = true, default-features = false }
7070
puffin = { workspace = true, optional = true }
7171
winit = { workspace = true, optional = true, default-features = false, features = [
7272
"rwh_06", # for compatibility with egui-winit

crates/egui_glow/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ mod vao;
2121

2222
pub use shader_version::ShaderVersion;
2323

24-
#[cfg(all(not(target_arch = "wasm32"), feature = "winit"))]
24+
#[cfg(feature = "winit")]
2525
pub mod winit;
26-
#[cfg(all(not(target_arch = "wasm32"), feature = "winit"))]
26+
#[cfg(feature = "winit")]
2727
pub use winit::*;
2828

2929
/// Check for OpenGL error and report it using `log::error`.

0 commit comments

Comments
 (0)