Skip to content

Commit ad8dd57

Browse files
authored
Enable bevy_tasks/async-io when async-io is in use (#20653)
# Objective bevy_tasks has a feature that otherwise goes unused in first-party crates to enable use of async-io's block_on instead of futures_lite::block_on. This enables the idle time between tasks to be used to process async-io's work. We do actually conditionally use `async-io` in a few locations. ## Solution Enable the feature when those features are in use. ## Future Work - [ ] smol-hyper unfortunately pulls in both async-io and async-executor. If we do end up merging #20331, we may want notgull/smol-hyper#3 to keep async-executor out of the dependency tree. ## Testing CI
1 parent 8c8cbaf commit ad8dd57

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

crates/bevy_remote/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ keywords = ["bevy"]
1010

1111
[features]
1212
default = ["http", "bevy_asset"]
13-
http = ["dep:async-io", "dep:smol-hyper"]
13+
http = ["dep:async-io", "dep:smol-hyper", "bevy_tasks/async-io"]
1414
bevy_asset = ["dep:bevy_asset"]
1515

1616
[dependencies]

crates/bevy_winit/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ default = ["x11"]
1313
trace = []
1414
wayland = ["winit/wayland", "winit/wayland-csd-adwaita"]
1515
x11 = ["winit/x11"]
16-
accesskit_unix = ["accesskit_winit/accesskit_unix", "accesskit_winit/async-io"]
16+
accesskit_unix = [
17+
"accesskit_winit/accesskit_unix",
18+
"accesskit_winit/async-io",
19+
"bevy_tasks/async-io",
20+
]
1721

1822
serialize = [
1923
"bevy_input/serialize",

0 commit comments

Comments
 (0)