Skip to content

Make it easier to opt out of bevy_audio#23126

Open
janhohenheim wants to merge 4 commits intobevyengine:mainfrom
janhohenheim:audio-feature
Open

Make it easier to opt out of bevy_audio#23126
janhohenheim wants to merge 4 commits intobevyengine:mainfrom
janhohenheim:audio-feature

Conversation

@janhohenheim
Copy link
Member

Objective

  • bevy_seedling is incompatible with bevy_audio
  • all our profile features (3d, 2d, ui) enable the audio collection feature
  • That means that a seedling user needs to do this to land at the current default:
[dependencies]
bevy = { version = "0.18.0", default-features = false, features = [
  # 2d
  "2d_bevy_render",
  "default_app",
  "picking",
  "scene",

  # 3d
  "3d_bevy_render",

  # ui
  "ui_api",
  "ui_bevy_render",

  # default_platform
  "android-game-activity",
  "bevy_gilrs",
  "bevy_winit",
  "default_font",
  "multi_threaded",
  "std",
  "sysinfo_plugin",
  "wayland",
  "webgl2",
  "x11",
] }

Solution

  • Disable the audio collection features for all profile features and instead enable it by default
  • The new seedling config now looks like this:
[dependencies]
bevy = { version = "0.18.0", default-features = false, features = [
  "2d",
  "3d",
  "ui",
] }

Testing

  • None, CI should take care of this

@janhohenheim janhohenheim added D-Trivial Nice and easy! A great choice to get started with Bevy A-Audio Sounds playback and modification M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 24, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in Audio Feb 24, 2026
@janhohenheim janhohenheim added this to the 0.19 milestone Feb 24, 2026
@alice-i-cecile alice-i-cecile added the X-Contentious There are nontrivial implications that should be thought through label Feb 24, 2026
@alice-i-cecile alice-i-cecile added X-Needs-SME This type of work requires an SME to approve it. S-Waiting-on-SME This is currently waiting for an SME to resolve something controversial and removed X-Contentious There are nontrivial implications that should be thought through S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 24, 2026
@alice-i-cecile
Copy link
Member

alice-i-cecile commented Feb 24, 2026

Summary of conversation on Discord about this work:

@cart: 2d / 3d as written were supposed to be "top level" collections that are "standalone". They each also pull in ui, scene, and audio, as those are all pieces of the "default 2d experience". I see the utility in reframing this (and thus forcing people to include the individual pieces they want manually), but we'd be losing the simplicity of single-feature profiles
@cart: If we're going to do that, I think we should consider what the lines are there. Ex: do we continue to include ui in 2d?
@alice-i-cecile: I think the top level features should be complementary and support common patterns. Splitting apart UI is also good
@cart: I think I agree. People disabling default features are doing so because they want control, and this is the level of granularity most of those people would be interested in. I just want to avoid getting to the point where building a "default 2D bevy app" requires knowing which 10 features to enable

@janhohenheim janhohenheim requested a review from cart February 24, 2026 18:29
Copy link
Member

@mnmaita mnmaita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this is a smart change. Even when "2d" is/was supposed to be something that enables a "full blown" 2d bevy app, it still requires to disable all default features and UI is still a separate thing so... And with audio it's been quite typical to use an external crate so far. Additionally, and semantically speaking, I'm not expecting a feature called "2d" to enable audio for me but that's just my point of view.

FWIW I had some ideas for the script that generates the cargo_features doc so I think I'll be working on some changes soon as this PR motivates me to improve and add more clarity to it.

@janhohenheim janhohenheim added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Waiting-on-SME This is currently waiting for an SME to resolve something controversial labels Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Audio Sounds playback and modification D-Trivial Nice and easy! A great choice to get started with Bevy M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Needs-SME This type of work requires an SME to approve it.

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

4 participants