Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/crates/bevy_platform/Cargo.toml
9358 views
1
[package]
2
name = "bevy_platform"
3
version = "0.19.0-dev"
4
edition = "2024"
5
description = "Provides common platform agnostic APIs, as well as platform-specific features 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 = ["std"]
13
14
# Functionality
15
16
## Adds serialization support through `serde`.
17
serialize = ["dep:serde", "hashbrown/serde"]
18
19
## Adds integration with Rayon.
20
rayon = ["dep:rayon", "hashbrown/rayon"]
21
22
# Platform Compatibility
23
24
## Provides an implementation of `block_on` from `futures-lite`.
25
futures-lite = ["std", "dep:futures-lite", "futures-lite?/std"]
26
27
## Provides an implementation of `block_on` from `async-io`.
28
async-io = ["std", "dep:async-io"]
29
30
## Allows access to the `std` crate. Enabling this feature will prevent compilation
31
## on `no_std` targets, but provides access to certain additional features on
32
## supported platforms.
33
std = [
34
"alloc",
35
"critical-section?/std",
36
"portable-atomic/std",
37
"portable-atomic-util/std",
38
"spin/std",
39
"foldhash/std",
40
"serde?/std",
41
"wasm-bindgen-futures?/std",
42
"futures-channel/std",
43
"wasm-bindgen?/std",
44
"js-sys?/std",
45
]
46
47
## Allows access to the `alloc` crate.
48
alloc = ["portable-atomic-util/alloc", "dep:hashbrown", "serde?/alloc"]
49
50
## `critical-section` provides the building blocks for synchronization primitives
51
## on all platforms, including `no_std`.
52
critical-section = ["dep:critical-section", "portable-atomic/critical-section"]
53
54
## Enables use of browser APIs if the build is a `wasm32` target.
55
web = [
56
"dep:web-time",
57
"dep:wasm-bindgen-futures",
58
"dep:wasm-bindgen",
59
"dep:js-sys",
60
]
61
62
[dependencies]
63
critical-section = { version = "1.2.0", default-features = false, optional = true }
64
spin = { version = "0.10.0", default-features = false, features = [
65
"mutex",
66
"spin_mutex",
67
"rwlock",
68
"once",
69
"lazy",
70
"barrier",
71
] }
72
foldhash = { version = "0.2.0", default-features = false }
73
hashbrown = { version = "0.16.1", features = [
74
"equivalent",
75
"raw-entry",
76
], optional = true, default-features = false }
77
serde = { version = "1", default-features = false, optional = true }
78
rayon = { version = "1", default-features = false, optional = true }
79
futures-lite = { version = "2.0.1", default-features = false, optional = true }
80
async-io = { version = "2.0.0", optional = true }
81
82
[target.'cfg(target_arch = "wasm32")'.dependencies]
83
web-time = { version = "1.1", default-features = false, optional = true }
84
wasm-bindgen-futures = { version = "0.4", default-features = false, optional = true }
85
futures-channel = { version = "0.3", default-features = false }
86
js-sys = { version = "0.3", default-features = false, optional = true }
87
wasm-bindgen = { version = "0.2", default-features = false, optional = true }
88
89
[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]
90
portable-atomic = { version = "1", default-features = false, features = [
91
"fallback",
92
] }
93
spin = { version = "0.10.0", default-features = false, features = [
94
"portable-atomic",
95
] }
96
97
[target.'cfg(not(target_has_atomic = "ptr"))'.dependencies]
98
portable-atomic-util = { version = "0.2.4", default-features = false }
99
100
[lints]
101
workspace = true
102
103
[package.metadata.docs.rs]
104
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
105
all-features = true
106
107