Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/crates/bevy_platform/Cargo.toml
6596 views
1
[package]
2
name = "bevy_platform"
3
version = "0.17.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
## Allows access to the `std` crate. Enabling this feature will prevent compilation
25
## on `no_std` targets, but provides access to certain additional features on
26
## supported platforms.
27
std = [
28
"alloc",
29
"critical-section?/std",
30
"portable-atomic/std",
31
"portable-atomic-util/std",
32
"spin/std",
33
"foldhash/std",
34
"serde?/std",
35
"wasm-bindgen-futures?/std",
36
"futures-channel/std",
37
"wasm-bindgen?/std",
38
"js-sys?/std",
39
]
40
41
## Allows access to the `alloc` crate.
42
alloc = ["portable-atomic-util/alloc", "dep:hashbrown", "serde?/alloc"]
43
44
## `critical-section` provides the building blocks for synchronization primitives
45
## on all platforms, including `no_std`.
46
critical-section = ["dep:critical-section", "portable-atomic/critical-section"]
47
48
## Enables use of browser APIs.
49
## Note this is currently only applicable on `wasm32` architectures.
50
web = [
51
"std",
52
"dep:web-time",
53
"dep:getrandom",
54
"dep:wasm-bindgen-futures",
55
"dep:wasm-bindgen",
56
"dep:js-sys",
57
]
58
59
[dependencies]
60
critical-section = { version = "1.2.0", default-features = false, optional = true }
61
spin = { version = "0.10.0", default-features = false, features = [
62
"mutex",
63
"spin_mutex",
64
"rwlock",
65
"once",
66
"lazy",
67
"barrier",
68
] }
69
foldhash = { version = "0.2.0", default-features = false }
70
hashbrown = { version = "0.16.0", features = [
71
"equivalent",
72
"raw-entry",
73
], optional = true, default-features = false }
74
serde = { version = "1", default-features = false, optional = true }
75
rayon = { version = "1", default-features = false, optional = true }
76
77
[target.'cfg(target_arch = "wasm32")'.dependencies]
78
web-time = { version = "1.1", default-features = false, optional = true }
79
getrandom = { version = "0.3.0", default-features = false, optional = true, features = [
80
"wasm_js",
81
] }
82
wasm-bindgen-futures = { version = "0.4", default-features = false, optional = true }
83
futures-channel = { version = "0.3", default-features = false }
84
js-sys = { version = "0.3", default-features = false, optional = true }
85
wasm-bindgen = { version = "0.2", default-features = false, optional = true }
86
87
[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]
88
portable-atomic = { version = "1", default-features = false, features = [
89
"fallback",
90
] }
91
spin = { version = "0.10.0", default-features = false, features = [
92
"portable-atomic",
93
] }
94
95
[target.'cfg(not(target_has_atomic = "ptr"))'.dependencies]
96
portable-atomic-util = { version = "0.2.4", default-features = false }
97
98
[lints]
99
workspace = true
100
101
[package.metadata.docs.rs]
102
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
103
all-features = true
104
105