mirror of
https://github.com/emilk/egui.git
synced 2026-06-28 07:23:13 -04:00
Only enable instant/wasm-bindgen when building for wasm32 architecture (#2808)
This commit is contained in:
@@ -46,9 +46,6 @@ wayland = ["winit/wayland"]
|
||||
egui = { version = "0.21.0", path = "../egui", default-features = false, features = [
|
||||
"tracing",
|
||||
] }
|
||||
instant = { version = "0.1", features = [
|
||||
"wasm-bindgen",
|
||||
] } # We use instant so we can (maybe) compile for web
|
||||
tracing = { version = "0.1", default-features = false, features = ["std"] }
|
||||
winit = { version = "0.28", default-features = false }
|
||||
|
||||
@@ -65,6 +62,14 @@ serde = { version = "1.0", optional = true, features = ["derive"] }
|
||||
|
||||
webbrowser = { version = "0.8.3", optional = true }
|
||||
|
||||
[target.'cfg(not(target_arch="wasm32"))'.dependencies]
|
||||
instant = { version = "0.1" }
|
||||
|
||||
[target.'cfg(target_arch="wasm32")'.dependencies]
|
||||
instant = { version = "0.1", features = [
|
||||
"wasm-bindgen",
|
||||
] } # We use instant so we can (maybe) compile for web
|
||||
|
||||
[target.'cfg(any(target_os="linux", target_os="dragonfly", target_os="freebsd", target_os="netbsd", target_os="openbsd"))'.dependencies]
|
||||
smithay-clipboard = { version = "0.6.3", optional = true }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user