agentleFS
chrisgliddonchrisgliddon/bevy-skills/skills/bevy-cargo-features/SKILL.md

bevy-cargo-features

Skill16 starsChanged 3 months agoMITView on GitHub

Use when selecting Bevy 0.19 Cargo features such as `2d`/`3d`/`ui`/`audio`, composing `3d_bevy_render` or API-only `3d_api`, building headless with `default_app`, enabling `bevy_gilrs`, or debugging missing UI/audio/input after `default-features = false`.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use MinimalPlugins, then add only the service plugins the server needs.

    line 61
  2. Very specific:

    Add bevy_winit/platform input only if the custom renderer shares Bevy's window event loop.

    line 74
  3. Very specific:

    Keep dev, dynamic_linking, file watchers, tracing, and dev tools behind a project development feature.

    line 108

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Bevy 0.19 — Cargo features

When to use this skill

  • Choose a supported application profile without enabling the full default set.
  • Compose a custom renderer or a headless server.
  • Enable native controller input, window/input APIs, or browser rendering.
  • Diagnose types/plugins missing after disabling default features.

Canonical profiles

Bevy's default is 2d + 3d + ui + audio. To select a profile, disabling defaults is essential:

# 3D game with Bevy UI, but no audio or 2D renderer
bevy = { version = "0.19", default-features = false, features = ["3d", "ui"] }

# 2D game with audio, but no 3D renderer or UI
# bevy = { version = "0.19", default-features = false, features = ["2d", "audio"] }

Writing features = ["3d"] while leaving default features enabled does not trim anything: Cargo unions feature sets.

Collection layers

LayerFeaturesMeaning
Profiles2d, 3d, ui, audioComplete app shapes
Built-in render2d_bevy_render, 3d_bevy_render, ui_bevy_renderBevy's renderer for one domain
API only2d_api, 3d_api, ui_apiComponents/assets without a render backend
Baselinedefault_app, default_platformCore app services vs platform/window/input services
Groupedscene, picking, devRelated feature collections

API-only features cannot draw. They are for custom/external renderers that consume Bevy's world-side types.

Headless server

bevy = { version = "0.19", default-features = false, features = [
    "default_app",
    "multi_threaded",
    "serialize",
    "bevy_world_serialization", # omit if the server never loads saved worlds
] }

Use MinimalPlugins, then add only the service plugins the server needs. bevy_scene is BSN in 0.19; classic reflected world serialization is bevy_world_serialization.

Custom renderer

bevy = { version = "0.19", default-features = false, features = [
    "default_app",
    "3d_api",
] }

Add bevy_winit/platform input only if the custom renderer shares Bevy's window event loop. Add 3d_bevy_render instead of 3d_api if you actually want Bevy's built-in renderer.

Input and controllers

  • mouse, keyboard, gamepad, touch, and gestures enable API pieces.
  • For native controller discovery/input, enable bevy_gilrs; it also enables gamepad. The gamepad feature alone is not the platform backend.
  • The high-level default_platform collection includes bevy_gilrs, Winit, desktop window backends, default font, and webgl2.

Browser profile

bevy = { version = "0.19", default-features = false, features = [
    "3d",
    "ui",
    "touch",
    # "webgpu", # overrides WebGL2; use a separate WebGPU artifact
] }

The 3d profile already includes the default platform and WebGL2 path. Enabling webgpu overrides webgl2; it is not a runtime fallback build. See bevy-wasm-webgpu.

0.19 implications and traps

  • 2d and 3d no longer imply ui; add ui explicitly.
  • 2d, 3d, and ui no longer imply audio; add audio or a lower-level codec combination explicitly.
  • scene now enables both bevy_world_serialization and the new BSN bevy_scene.
  • Keep dev, dynamic_linking, file watchers, tracing, and dev tools behind a project development feature; do not ship them accidentally.
  • Native Linux window backends are x11 and wayland; target-specific mobile activity features are mutually exclusive where documented. Do not invent windows or macos Bevy feature names.
  • Profile collections are the stable starting point. Use lower-level collections only when compile time, binary size, or a custom renderer makes the maintenance cost worthwhile.

See also

  • bevy-rendering — renderer decision boundary.
  • bevy-wasm-webgpu — browser build pipeline.
  • bevy-a11y — input/backend requirements for accessibility.
  • bevy-migration-0-18-to-0-19 — changed implications.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.