diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index 10eddf97..c456ad28 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -58,3 +58,15 @@ luminol-graphics.workspace = true # * Misc. * # itertools.workspace = true rand.workspace = true + +# Set poll promise features here based on the target +# I'd much rather do it in the workspace, but cargo doesn't support that yet +# +# Doing this also relies on a quirk of features, that any crate specifying features applies to ALL crates +[target.'cfg(not(target_arch = "wasm32"))'.dependencies.poll-promise] +workspace = true +features = ["tokio"] + +[target.'cfg(target_arch = "wasm32")'.dependencies.poll-promise] +workspace = true +features = ["web"] diff --git a/crates/launcher/Cargo.toml b/crates/launcher/Cargo.toml index 7e65f496..98ebf330 100644 --- a/crates/launcher/Cargo.toml +++ b/crates/launcher/Cargo.toml @@ -21,6 +21,8 @@ luminol-eframe.workspace = true luminol-egui-wgpu.workspace = true rfd.workspace = true +poll-promise.workspace = true + wgpu.workspace = true image.workspace = true @@ -85,18 +87,6 @@ steamworks = { version = "0.10.0", optional = true } # Bindings to the Steamwork workspace = true features = ["spin"] -# Set poll promise features here based on the target -# I'd much rather do it in the workspace, but cargo doesn't support that yet -# -# Doing this also relies on a quirk of features, that any crate specifying features applies to ALL crates -[target.'cfg(not(target_arch = "wasm32"))'.dependencies.poll-promise] -workspace = true -features = ["tokio"] - -[target.'cfg(target_arch = "wasm32")'.dependencies.poll-promise] -workspace = true -features = ["web"] - # Web # FIXME: Look into somehow pinning these as workspace dependencies [target.'cfg(target_arch = "wasm32")'.dependencies]