Skip to content

Commit

Permalink
Restore wasm-bindgen-futures to be wasm32 only.
Browse files Browse the repository at this point in the history
  • Loading branch information
futursolo committed May 23, 2022
1 parent 8503d24 commit 1f0b5e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/yew/Cargo.toml
Expand Up @@ -32,7 +32,6 @@ html-escape = { version = "0.2.9", optional = true }
base64ct = { version = "1.5.0", features = ["std"], optional = true }
bincode = { version = "1.3.3", optional = true }
serde = { version = "1", features = ["derive"] }
wasm-bindgen-futures = "0.4"

[dependencies.web-sys]
version = "0.3"
Expand Down Expand Up @@ -68,6 +67,10 @@ features = [
"HtmlScriptElement",
]

[target.'cfg(target_arch = "wasm32")'.dependencies]
# we move it here so no promise-based spawn_local can present for
# non-wasm32 targets.
wasm-bindgen-futures = "0.4"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1.15.0", features = ["rt"], optional = true }
Expand Down

0 comments on commit 1f0b5e1

Please sign in to comment.