From 7c91aff215938ef35fe0000b0969f31481d927d6 Mon Sep 17 00:00:00 2001 From: Kaede Hoshikawa Date: Thu, 29 Sep 2022 00:42:10 +0900 Subject: [PATCH] Restore wasm-bindgen-futures. --- packages/yew-platform/Cargo.toml | 2 +- packages/yew/Cargo.toml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/yew-platform/Cargo.toml b/packages/yew-platform/Cargo.toml index 90d4daa3dff..6acfc1597be 100644 --- a/packages/yew-platform/Cargo.toml +++ b/packages/yew-platform/Cargo.toml @@ -12,7 +12,6 @@ repository = "https://github.com/yewstack/yew" rust-version = "1.60.0" [dependencies] -gloo = "0.8" futures = { version = "0.3", default-features = false, features = ["std", "async-await"] } pin-project = "1.0.11" pinned = "0.1.0" @@ -21,6 +20,7 @@ pinned = "0.1.0" # we move wasm-bindgen here so no promise-based spawn_local can present for # non-wasm32 targets. wasm-bindgen-futures = "0.4" +gloo = "0.8" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] num_cpus = { version = "1.13", optional = true } diff --git a/packages/yew/Cargo.toml b/packages/yew/Cargo.toml index 6be3d0326da..fab0c2e86b7 100644 --- a/packages/yew/Cargo.toml +++ b/packages/yew/Cargo.toml @@ -34,6 +34,9 @@ serde = { version = "1", features = ["derive"] } tracing = "0.1.36" yew-platform = { version = "0.1.0", path = "../yew-platform" } +[target.'cfg(target_arch = "wasm32")'.dependencies] +wasm-bindgen-futures = "0.4" + [target.'cfg(not(target_arch = "wasm32"))'.dependencies] # We still need tokio as we have docs linked to it. tokio = { version = "1.19", features = ["rt"] }