Skip to content

Add more features to allow the removal of unused dependencies in library crates #24495

@Green21Black

Description

@Green21Black

Many bevy crates don't have features to remove unused dependencies.

Many bevy crates have features that allow using the crate without bevy, but they don't always have features for use in libraries that only need the types and not the actual functionality.

For example, bevy_transform has a bevy-support feature that can be disabled to reduce unused dependencies, but no feature that allows using Transform as a Component without also adding bevy_app as a dependency. Moreover, the bevy_app dependency is only used for the TransformPlugin, which isn't normally needed in libraries.

Solution

Add more features to bevy crates that allow more fine grained control over the dependencies used.

Additional Request

These features would also allow for something like a library feature for bevy, that can be used in libraries that don't need bevy features like Plugins or App.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Cross-CuttingImpacts the entire engineC-UsabilityA targeted quality-of-life change that makes Bevy easier to useD-ComplexQuite challenging from either a design or technical perspective. Ask for help!S-Needs-GoalThis should have a C-Goal and should not continue until it has one

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions