Cargo Features

[dependencies]
bevy_platform_support = { version = "0.16.0-rc.1", default-features = false, features = ["serialize", "std", "alloc", "critical-section", "web"] }
default = std

The std feature is set by default whenever bevy_platform_support is added without default-features = false somewhere in the dependency tree.

serialize

Functionality

Adds serialization support through serde.

Enables serde of hashbrown

std default = alloc

Platform Compatibility

Allows access to the std crate. Enabling this feature will prevent compilation on no_std targets, but provides access to certain additional features on supported platforms.

Enables std of optional critical-section, foldhash, portable-atomic, portable-atomic-util, and spin

alloc std

Allows access to the alloc crate.

Enables hashbrown, alloc of portable-atomic-util

Affects bevy_platform_support::collections

critical-section

critical-section provides the building blocks for synchronization primitives on all platforms, including no_std.

Enables critical-section, critical-section of portable-atomic

web

Enables use of browser APIs. Note this is currently only applicable on wasm32 architectures.

Enables getrandom ^0.2.0 and web-time