Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/docs/cargo_features.md
6589 views

Cargo Features

Bevy exposes many features to customize the engine. Enabling them add functionalities but often come at the cost of longer compilation times and extra dependencies.

Default Features

The default feature set enables most of the expected features of a game engine, like rendering in both 2D and 3D, asset loading, audio and UI. To help reduce compilation time, consider disabling default features and enabling only those you need.

feature namedescription
android-game-activityAndroid GameActivity support. Default, choose between this and android-native-activity.
android_shared_stdcxxEnable using a shared stdlib for cxx on Android
animationEnable animation support, and glTF animation loading
async_executorUses async-executor as a task execution backend.
bevy_animationProvides animation functionality
bevy_anti_aliasProvides various anti aliasing solutions
bevy_assetProvides asset functionality
bevy_audioProvides audio functionality
bevy_cameraProvides camera and visibility types, as well as culling primitives.
bevy_colorProvides shared color types and operations
bevy_core_pipelineProvides cameras and other basic render pipeline features
bevy_core_widgetsHeadless widget collection for Bevy UI.
bevy_gilrsAdds gamepad support
bevy_gizmosAdds support for rendering gizmos
bevy_gltfglTF support
bevy_imageLoad and access image data. Usually added by an image format
bevy_input_focusEnable input focus subsystem
bevy_lightProvides light types such as point lights, directional lights, spotlights.
bevy_logEnable integration with tracing and log
bevy_meshProvides a mesh format and some primitive meshing routines.
bevy_mesh_picking_backendProvides an implementation for picking meshes
bevy_pbrAdds PBR rendering
bevy_pickingProvides picking functionality
bevy_post_processProvides post process effects such as depth of field, bloom, chromatic aberration.
bevy_renderProvides rendering functionality
bevy_sceneProvides scene functionality
bevy_shaderProvides shaders usable through asset handles.
bevy_spriteProvides sprite functionality
bevy_sprite_picking_backendProvides an implementation for picking sprites
bevy_sprite_renderProvides sprite rendering functionality
bevy_stateEnable built in global state machines
bevy_textProvides text functionality
bevy_uiA custom ECS-driven UI framework
bevy_ui_picking_backendProvides an implementation for picking UI
bevy_ui_renderProvides rendering functionality for bevy_ui
bevy_windowWindowing layer
bevy_winitwinit window and input backend
custom_cursorEnable winit custom cursor support
debugEnable collecting debug information about systems and components to help with diagnostics
default_fontInclude a default font, containing only ASCII characters, at the cost of a 20kB binary size increase
hdrHDR image format support
ktx2KTX2 compressed texture support
multi_threadedEnables multithreaded parallelism in the engine. Disabling it forces all engine tasks to run on a single thread.
pngPNG image format support
reflect_auto_registerEnable automatic reflect registration
smaa_lutsInclude SMAA Look Up Tables KTX2 Files
stdAllows access to the std crate.
sysinfo_pluginEnables system information diagnostic plugin
tonemapping_lutsInclude tonemapping Look Up Tables KTX2 files. If everything is pink, you need to enable this feature or change the Tonemapping method for your Camera2d or Camera3d.
vorbisOGG/VORBIS audio format support
waylandWayland display server support
webgl2Enable some limitations to be able to use WebGL2. Please refer to the WebGL2 and WebGPU section of the examples README for more information on how to run Wasm builds with WebGPU.
x11X11 display server support
zstd_rustFor KTX2 Zstandard decompression using pure rust ruzstd. This is the safe default. For maximum performance, use "zstd_c".

Optional Features

feature namedescription
accesskit_unixEnable AccessKit on Unix backends (currently only works with experimental screen readers and forks.)
android-native-activityAndroid NativeActivity support. Legacy, should be avoided for most new Android games.
asset_processorEnables the built-in asset processor for processed assets.
async-ioUse async-io's implementation of block_on instead of futures-lite's implementation. This is preferred if your application uses async-io.
basis-universalBasis Universal compressed texture support
bevy_ci_testingEnable systems that allow for automated testing on CI
bevy_debug_steppingEnable stepping-based debugging of Bevy systems
bevy_dev_toolsProvides a collection of developer tools
bevy_remoteEnable the Bevy Remote Protocol
bevy_solariProvides raytraced lighting (experimental)
bevy_ui_debugProvides a debug overlay for bevy UI
bluenoise_textureInclude spatio-temporal blue noise KTX2 file used by generated environment maps, Solari and atmosphere
bmpBMP image format support
compressed_image_saverEnables compressed KTX2 UASTC texture output on the asset processor
critical-sectioncritical-section provides the building blocks for synchronization primitives on all platforms, including no_std.
ddsDDS compressed texture support
debug_glam_assertEnable assertions in debug builds to check the validity of parameters passed to glam
default_no_stdRecommended defaults for no_std applications
detailed_traceEnable detailed trace event logging. These trace events are expensive even when off, thus they require compile time opt-in
dlssNVIDIA Deep Learning Super Sampling
dynamic_linkingForce dynamic linking, which improves iterative compile times
embedded_watcherEnables watching in memory asset providers for Bevy Asset hot-reloading
experimental_bevy_feathersFeathers widget collection.
experimental_pbr_pcssEnable support for PCSS, at the risk of blowing past the global, per-shader sampler limit on older/lower-end GPUs
exrEXR image format support
ffFarbfeld image format support
file_watcherEnables watching the filesystem for Bevy Asset hot-reloading
flacFLAC audio format support
force_disable_dlssForcibly disable DLSS so that cargo build --all-features works without the DLSS SDK being installed. Not meant for users.
ghost_nodesExperimental support for nodes that are ignored for UI layouting
gifGIF image format support
glam_assertEnable assertions to check the validity of parameters passed to glam
hotpatchingEnable hotpatching of Bevy systems
httpEnables downloading assets from HTTP sources. Warning: there are security implications. Read the docs on WebAssetPlugin.
httpsEnables downloading assets from HTTPS sources. Warning: there are security implications. Read the docs on WebAssetPlugin.
icoICO image format support
jpegJPEG image format support
libmUses the libm maths library instead of the one provided in std and core.
meshletEnables the meshlet renderer for dense high-poly scenes (experimental)
meshlet_processorEnables processing meshes into meshlet meshes for bevy_pbr
mp3MP3 audio format support
pbr_anisotropy_textureEnable support for anisotropy texture in the StandardMaterial, at the risk of blowing past the global, per-shader texture limit on older/lower-end GPUs
pbr_clustered_decalsEnable support for Clustered Decals
pbr_light_texturesEnable support for Light Textures
pbr_multi_layer_material_texturesEnable support for multi-layer material textures in the StandardMaterial, at the risk of blowing past the global, per-shader texture limit on older/lower-end GPUs
pbr_specular_texturesEnable support for specular textures in the StandardMaterial, at the risk of blowing past the global, per-shader texture limit on older/lower-end GPUs
pbr_transmission_texturesEnable support for transmission-related textures in the StandardMaterial, at the risk of blowing past the global, per-shader texture limit on older/lower-end GPUs
pnmPNM image format support, includes pam, pbm, pgm and ppm
qoiQOI image format support
raw_vulkan_initForces the wgpu instance to be initialized using the raw Vulkan HAL, enabling additional configuration
reflect_auto_register_staticEnable automatic reflect registration without inventory. See reflect::load_type_registrations for more info.
reflect_documentationEnable documentation reflection
reflect_functionsEnable function reflection
serializeEnable serialization support through serde
shader_format_glslEnable support for shaders in GLSL
shader_format_spirvEnable support for shaders in SPIR-V
shader_format_weslEnable support for shaders in WESL
spirv_shader_passthroughEnable passthrough loading for SPIR-V shaders (Only supported on Vulkan, shader capabilities and extensions must agree with the platform implementation)
statically-linked-dxcStatically linked DXC shader compiler for DirectX 12
symphonia-aacAAC audio format support (through symphonia)
symphonia-allAAC, FLAC, MP3, MP4, OGG/VORBIS, and WAV audio formats support (through symphonia)
symphonia-flacFLAC audio format support (through symphonia)
symphonia-isomp4MP4 audio format support (through symphonia)
symphonia-vorbisOGG/VORBIS audio format support (through symphonia)
symphonia-wavWAV audio format support (through symphonia)
tgaTGA image format support
tiffTIFF image format support
traceTracing support
trace_chromeTracing support, saving a file in Chrome Tracing format
trace_tracyTracing support, exposing a port for Tracy
trace_tracy_memoryTracing support, with memory profiling, exposing a port for Tracy
track_locationEnables source location tracking for change detection and spawning/despawning, which can assist with debugging
wavWAV audio format support
webEnables use of browser APIs. Note this is currently only applicable on wasm32 architectures.
web_asset_cacheEnable caching downloaded assets on the filesystem. NOTE: this cache currently never invalidates entries!
webgpuEnable support for WebGPU in Wasm. When enabled, this feature will override the webgl2 feature and you won't be able to run Wasm builds with WebGL2, only with WebGPU.
webpWebP image format support
zlibFor KTX2 supercompression
zstd_cFor KTX2 Zstandard decompression using zstd. This is a faster backend, but uses unsafe C bindings. For the safe option, stick to the default backend with "zstd_rust".