Skip to content

Commit

Permalink
Only enable instant/wasm-bindgen when building for wasm32 architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
gferon committed Mar 13, 2023
1 parent 3217eaa commit 4f4a2ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ cfg_aliases = "0.1.1"

[dependencies]
bitflags = "1"
instant = { version = "0.1", features = ["wasm-bindgen"] }
log = "0.4"
mint = { version = "0.5.6", optional = true }
once_cell = "1.12"
Expand Down Expand Up @@ -104,6 +103,7 @@ features = [
]

[target.'cfg(all(unix, not(any(target_os = "redox", target_arch = "wasm32", target_os = "android", target_os = "ios", target_os = "macos"))))'.dependencies]
instant = { version = "0.1" }
libc = "0.2.64"
mio = { version = "0.8", features = ["os-ext"], optional = true }
percent-encoding = { version = "2.0", optional = true }
Expand All @@ -114,6 +114,9 @@ wayland-protocols = { version = "0.29.5", features = [ "staging_protocols"], opt
wayland-commons = { version = "0.29.5", optional = true }
x11-dl = { version = "2.18.5", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
instant = { version = "0.1", features = ["wasm-bindgen"] }

[target.'cfg(target_os = "redox")'.dependencies]
orbclient = { version = "0.3.42", default-features = false }
redox_syscall = "0.3"
Expand Down

0 comments on commit 4f4a2ea

Please sign in to comment.