Cargo Features
[dependencies]
bevy_color = { version = "0.16.0-rc.2", default-features = false, features = ["std", "alloc", "serialize", "bevy_reflect", "wgpu-types", "encase", "libm", "critical-section"] }
- default = bevy_reflect, encase, std
-
These default features are set whenever
bevy_color
is added without
somewhere in the dependency tree.default-features = false - std default encase = alloc
-
Enables std of bevy_math, optional bevy_reflect, optional serde, and optional wgpu-types
bevy_reflect:
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. - alloc std
-
Enables alloc of bevy_math and optional serde
serde:
Provide impls for types in the Rust core allocation and collections library including String, Box<T>, Vec<T>, and Cow<T>. This is a subset of std but may be enabled without depending on all of std.
- serialize = serde
- bevy_reflect default
-
Enables bevy_reflect
- wgpu-types
-
Enables wgpu-types
- encase default = std
-
Enables encase
- libm
-
bevy_math:
Enable libm mathematical functions for glam types to ensure consistent outputs across platforms at the cost of losing hardware-level optimization using intrinsics
- critical-section
-
Enables critical-section of optional bevy_reflect
bevy_reflect:
critical-section
provides the building blocks for synchronization primitives on all platforms, includingno_std
.
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.