Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/crates/bevy_tasks/Cargo.toml
6601 views
1
[package]
2
name = "bevy_tasks"
3
version = "0.17.0-dev"
4
edition = "2024"
5
description = "A task executor for Bevy Engine"
6
homepage = "https://bevy.org"
7
repository = "https://github.com/bevyengine/bevy"
8
license = "MIT OR Apache-2.0"
9
keywords = ["bevy"]
10
11
[features]
12
default = ["async_executor", "futures-lite"]
13
14
# Enables multi-threading support.
15
# Without this feature, all tasks will be run on a single thread.
16
multi_threaded = [
17
"bevy_platform/std",
18
"dep:async-channel",
19
"dep:concurrent-queue",
20
"async_executor",
21
]
22
23
# Uses `async-executor` as a task execution backend.
24
# This backend is incompatible with `no_std` targets.
25
async_executor = ["bevy_platform/std", "dep:async-executor", "futures-lite"]
26
27
# Provide an implementation of `block_on` from `futures-lite`.
28
futures-lite = ["bevy_platform/std", "futures-lite/std"]
29
30
# Use async-io's implementation of block_on instead of futures-lite's implementation.
31
# This is preferred if your application uses async-io.
32
async-io = ["bevy_platform/std", "dep:async-io"]
33
34
[dependencies]
35
bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-features = false, features = [
36
"alloc",
37
] }
38
39
futures-lite = { version = "2.0.1", default-features = false, features = [
40
"alloc",
41
] }
42
async-task = { version = "4.4.0", default-features = false }
43
derive_more = { version = "2", default-features = false, features = [
44
"deref",
45
"deref_mut",
46
] }
47
async-executor = { version = "1.11", optional = true }
48
async-channel = { version = "2.3.0", optional = true }
49
async-io = { version = "2.0.0", optional = true }
50
concurrent-queue = { version = "2.0.0", optional = true }
51
atomic-waker = { version = "1", default-features = false }
52
crossbeam-queue = { version = "0.3", default-features = false, features = [
53
"alloc",
54
] }
55
56
[target.'cfg(target_arch = "wasm32")'.dependencies]
57
pin-project = "1"
58
async-channel = "2.3.0"
59
60
[target.'cfg(not(all(target_has_atomic = "8", target_has_atomic = "16", target_has_atomic = "32", target_has_atomic = "64", target_has_atomic = "ptr")))'.dependencies]
61
async-task = { version = "4.4.0", default-features = false, features = [
62
"portable-atomic",
63
] }
64
heapless = { version = "0.8", default-features = false, features = [
65
"portable-atomic",
66
] }
67
atomic-waker = { version = "1", default-features = false, features = [
68
"portable-atomic",
69
] }
70
71
[dev-dependencies]
72
futures-lite = { version = "2.0.1", default-features = false, features = [
73
"std",
74
] }
75
async-channel = "2.3.0"
76
77
[lints]
78
workspace = true
79
80
[package.metadata.docs.rs]
81
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
82
all-features = true
83
84