Skip to content

Consider breaking bevy_core up #2931

@CAD97

Description

@CAD97

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

bevy_core currently serves a number of different roles:

  • type registrations: math / std / ecs / time / misc
  • time
  • names / labels
  • FloatOrd
  • Byte conversion
  • task pool setup

I do think that it is worth revisiting bevy_core.

What solution would you like?

I think we can probably find a solution that satisfies everyone:

  • Byte conversion will be deprecated in favor of bytemuck and crevice once the new renderer gets merged
  • bevy_math might actually be able to define its own plugin / take a dependency on bevy_app. this forces bevy_math consumers to also consume bevy_app / bevy_ecs / etc, but maybe thats ok.
  • time stuff could be broken out into bevy_time
  • FloatOrd could be moved to bevy_utils (although its type registration cannot)
  • Type registrations could be moved somewhere else (maybe even the top level bevy_internal crate)
  • We could consider doing a task pool setup plugin in bevy_ecs or bevy_internal

In short, we might be able to do away with bevy_core entirely. I'd prefer to start doing this stuff after the new renderer is merged to avoid conflicts / allow us to remove the Bytes stuff entirely. These are all straightforward changes that won't take any real time investment.

What alternative(s) have you considered?

Status quo

Additional context

#2900 (comment); blockquotes are from @cart in linked comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-Code-QualityA section of code that is hard to understand or changeC-FeatureA new feature, making something new possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions