Cargo Features
[dependencies]
bevy_platform = { version = "0.17.1", default-features = false, features = ["serialize", "rayon", "std", "alloc", "critical-section", "web"] }
- default = std
-
The
std
feature is set by default wheneverbevy_platform
is added without
somewhere in the dependency tree.default-features = false - serialize
-
Functionality
Adds serialization support through
serde
. - rayon
-
Adds integration with Rayon.
- std default web? = alloc
-
Platform Compatibility
Allows access to the
std
crate. Enabling this feature will prevent compilation onno_std
targets, but provides access to certain additional features on supported platforms.Enables std of optional critical-section, foldhash, futures-channel, optional js-sys, portable-atomic, portable-atomic-util, optional serde, spin, optional wasm-bindgen, and optional wasm-bindgen-futures
- alloc std
-
Allows access to the
alloc
crate.Enables hashbrown, alloc of portable-atomic-util and optional serde
- critical-section
-
critical-section
provides the building blocks for synchronization primitives on all platforms, includingno_std
.Enables critical-section, critical-section of portable-atomic
- web = std
-
Enables use of browser APIs. Note this is currently only applicable on
wasm32
architectures.Enables getrandom, js-sys, wasm-bindgen, wasm-bindgen-futures, and web-time