Skip to content

Add more granular features to bevy_ecs #4981

@alice-i-cecile

Description

@alice-i-cecile

What problem does this solve or what need does it fill?

Other projects may want to depend on bevy_ecs, but cannot do so comfortably due to the inclusion of irrelevant code.

See DioxusLabs/taffy#130 for an example.

What solution would you like?

Add granular feature flags to bevy_ecs:

  • events
  • systems
  • scheduling (depends on systems)

All of these would be default features.

Only core data structures (World, Entity, Query and so on) would be included without a feature flag.

What alternative(s) have you considered?

Eat the longer compile times and rely on rustc to optimize away the relevant code.

Use a lighter-weight ECS like hecs instead.

Additional context

This would make #3786 even more reasonable and feasible; this could simply be another feature flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions