Skip to content

Adds more granularities control to bevy_transform related to bevy dependencies - #26365

Open
CodingDaniel1 wants to merge 4 commits into
bevyengine:mainfrom
CodingDaniel1:separate-transform-bevy-dependency-more
Open

CodingDaniel1 wants to merge 4 commits into
bevyengine:mainfrom
CodingDaniel1:separate-transform-bevy-dependency-more

Conversation

@CodingDaniel1

@CodingDaniel1 CodingDaniel1 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Objective

bevy_transform allows external use without the large bevy dependency tree, but it does not allow to specify which bevy dependencies to include (bevy_ecs, bevy_app). bevy-support feature simply enables both of them, which can be annoying when bevy_app isn't needed. It would be nice to have finer granularity over bevy-support.

Solution

Use the corresponding feature flag to replace previous bevy-support.

Testing

There is no actual code changes, only guards changes, and bevy-support flag is still present with just finer granularity. So just check the CI to see if it's passing the tests or not.

Comment thread crates/bevy_transform/Cargo.toml Resolved
Comment thread crates/bevy_transform/src/lib.rs Resolved
@kfc35 kfc35 added A-Transform Translations, rotations and scales S-Needs-Review Needs reviewer attention (from anyone!) to move forward D-Straightforward Simple bug fixes and API improvements, docs, test and examples C-Usability A targeted quality-of-life change that makes Bevy easier to use AI-Free Does not disclose the use of AI labels Nov 5, 2026

use bevy_ecs::{prelude::*, query::QueryFilter};

/// Set enum for the systems relating to transform propagation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I think I would prefer this to be a separate PR, but I'm not going to block on this since this move seems ok...

... Although I might suggest having a migration guide for the move eventually. It's not a big deal though / necessary right now -- the prelude also re-exports the system set, so I'm unsure how many projects would be broken by the move

## This exists because it allows opting out of all of this, leaving only a bare-bones transform struct,
## which enables users to depend on that without needing the larger Bevy dependency tree.
bevy-support = ["alloc", "dep:bevy_app", "dep:bevy_ecs"]
bevy-support = ["alloc", "bevy_app", "bevy_ecs"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: since bevy_app implicitly enables bevy_ecs as well, you can remove the bevy_ecs / alloc part of this, although maybe that warrants adding a comment that this is just an alias for the bevy_app feature

Suggested change
bevy-support = ["alloc", "bevy_app", "bevy_ecs"]
bevy-support = ["bevy_app"]

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Transform Translations, rotations and scales AI-Free Does not disclose the use of AI C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants