Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ unsafe_op_in_unsafe_fn = "warn"
unused_qualifications = "warn"

[features]
default = ["2d", "3d", "ui"]
default = ["2d", "3d", "ui", "audio"]

# PROFILE: The default 2D Bevy experience. This includes the core Bevy framework, 2D functionality, Bevy UI, scenes, audio, and picking.
2d = [
Expand All @@ -140,7 +140,6 @@ default = ["2d", "3d", "ui"]
"2d_bevy_render",
"ui",
"scene",
"audio",
"picking",
]

Expand All @@ -151,7 +150,6 @@ default = ["2d", "3d", "ui"]
"3d_bevy_render",
"ui",
"scene",
"audio",
"picking",
]

Expand All @@ -162,7 +160,6 @@ ui = [
"ui_api",
"ui_bevy_render",
"scene",
"audio",
"picking",
"bevy_ui_widgets",
]
Expand Down
2 changes: 1 addition & 1 deletion docs/cargo_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ bevy = { version = "0.18", default-features = false, features = ["2d"] }

|Profile|Description|
|-|-|
|default|The full default Bevy experience. This is a combination of the following profiles: 2d, 3d, ui|
|default|The full default Bevy experience. This is a combination of the following profiles: 2d, 3d, ui, audio|
|2d|The default 2D Bevy experience. This includes the core Bevy framework, 2D functionality, Bevy UI, scenes, audio, and picking.|
|3d|The default 3D Bevy experience. This includes the core Bevy framework, 3D functionality, Bevy UI, scenes, audio, and picking.|
|ui|The default Bevy UI experience. This includes the core Bevy framework, Bevy UI, scenes, audio, and picking.|
Expand Down
24 changes: 24 additions & 0 deletions release-content/migration-guides/audio_feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: "`audio` feature is now no longer implied by the `3d`, `2d`, or `ui` features"
pull_requests: [23126]
---

Our `default` features used to be
- 2d
- 3d
- ui

where each of these features enabled the `audio` feature among others.

Since Cargo doesn't allow selectively disabling features, if you wished to disable `bevy_audio`, either because you don't need audio or because you use an alternative such as bevy_seedling, you had a problem with that.
You needed to essentially enable all features enabled by the above *except* `audio`, leading to a big `features` soup. To avoid this,
`audio` is now no longer enabled by the above features, but instead enabled by default, bumping our default features to:
- 2d
- 3d,
- ui
- audio

Now what does this mean for you?
- If you used all default features before, nothing changes for you.
- If you want to opt out of using `bevy_audio`, it is now as simple as disabling default features, and manually opting into `3d`, `2d`, and/or `ui`.
- If you already opted into non-default features and want to continue using `bevy_audio`, you will now have to add the `audio` feature.