Open-Source Wikis

/

Bevy

/

Reference

/

Configuration

bevyengine/bevy

Configuration

Bevy is heavily feature-flagged. The right combination of cargo features makes the difference between a 200 MiB shipped binary with the kitchen sink and a 5 MiB headless server. This page summarizes the main knobs.

The full canonical list (kept in sync by tools/build-templated-pages) lives in docs/cargo_features.md.

Profiles

The "give me X" buckets:

Profile Description
default The full Bevy experience. Composed from 2d, 3d, ui, audio.
2d 2D + scenes + picking.
3d 3D + scenes + picking.
ui Bevy UI + scenes + picking.

Use them with default-features = false:

bevy = { version = "0.18", default-features = false, features = ["3d"] }

Collections

Mid-level groups composed by profiles. Useful when you want to assemble your own profile (custom renderer, headless app, no_std target).

Collection Description
dev Hot reload + dev tools. Do not enable in shipping builds. Composed of debug, bevy_dev_tools, file_watcher.
audio bevy_audio + Vorbis.
audio-all-formats All supported audio codecs.
scene Scene support: bevy_world_serialization + bevy_scene.
picking Picking with all backends.
default_app Core baseline for headless apps: async executor, asset, log, state, window, input focus, custom cursor, reflect auto-register.
default_platform OS support: std, gilrs, winit, clipboard, default font, multi-threaded, webgl2, x11, wayland, sysinfo.
common_api Default scene definition features (no renderer).
2d_api, 3d_api, ui_api Domain-specific feature sets (no renderer).
2d_bevy_render, 3d_bevy_render, ui_bevy_render Domain-specific built-in renderers.
default_no_std Baseline for no_std: libm, critical-section, color, state.

Top-level toggles

A small selection of widely-relevant features:

Feature Description
dynamic_linking Enable for fast iterative compiles (do not ship).
multi_threaded Multi-threaded ECS scheduling. On by default; disable for Wasm without atomics.
file_watcher Hot-reload assets.
embedded_watcher Hot-reload embedded:// assets.
asset_processor Offline asset processing.
webgl2 / webgpu Web graphics backends.
x11 / wayland Linux windowing backends.
bevy_remote Enable the BRP.
bevy_dev_tools FPS overlay, state inspector, etc.
bevy_ci_testing Hooks for automated CI runs.
serialize Enable serde for ECS types.
trace, trace_tracy, trace_chrome Tracing backends.
reflect_auto_register Auto-register reflectable types via inventory.
libm Use libm for deterministic math.

Per-crate toggles (bevy_animation, bevy_asset, bevy_audio, bevy_camera, …) let you compile a subset of the engine. The full feature list and dependency graph is in Cargo.toml in the workspace root.

Environment variables

| Variable | Effect | | ------------------------------- | ----------------------------------------------------------------- | ---------------------------------------- | | RUST_LOG | Filter tracing output (e.g. RUST_LOG=info,bevy_render=debug). | | BEVY_BACKTRACE=full | Enable backtraces from the panic handler. | | WGPU_BACKEND | Force a wgpu backend (vulkan, metal, dx12). | | WGPU_DEBUG=1 | Enable debug labels in wgpu. | | WGPU_VALIDATION=0 | Disable wgpu validation layers. | | WGPU_FORCE_FALLBACK_ADAPTER=1 | Use the software adapter (matches CI). | | WGPU_ADAPTER_NAME | Pick a specific adapter by name. | | WGPU_SETTINGS_PRIO=webgl2 | webgpu | Use webgl2/webgpu limits even on native. | | VERBOSE_SHADER_ERROR=1 | More detailed WGSL compile errors. |

Build profiles

The workspace root Cargo.toml defines a few non-trivial profile additions worth knowing:

  • [profile.dev] — standard cargo dev.
  • [profile.dev-fast] — used by tools/example-showcase. Faster than dev, slower than release.
  • [profile.release] — standard cargo release. The shipping target.

For "fast compiles" the .cargo/config_fast_builds.toml file pre-configures the linker (LLD/mold) per platform; copy to .cargo/config.toml to opt in.

See also

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Configuration – Bevy wiki | Factory