Skip to content

Commit

Permalink
enable poll-promise backend on core crate
Browse files Browse the repository at this point in the history
  • Loading branch information
melody-rs committed Oct 20, 2024
1 parent 42108ad commit 6378442
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
12 changes: 12 additions & 0 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
14 changes: 2 additions & 12 deletions crates/launcher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 6378442

Please sign in to comment.