Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move hashbrown and foldhash out of bevy_utils #17460

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bushrat011899
Copy link
Contributor

@bushrat011899 bushrat011899 commented Jan 20, 2025

Objective

Solution

  • Moved hashbrown, foldhash, and related types out of bevy_utils and into bevy_platform_support
  • Refactored the above to match the layout of these types in std.
  • Updated crates as required.

Testing

  • CI

Migration Guide

  • The following items were moved out of bevy_utils and into bevy_platform_support::hash:
    • FixedState
    • DefaultHasher
    • RandomState
    • FixedHasher
    • Hashed
    • PassHash
    • PassHasher
    • NoOpHash
  • The following items were moved out of bevy_utils and into bevy_platform_support::collections:
    • HashMap
    • HashSet
  • bevy_utils::hashbrown has been removed. Instead, import from bevy_platform_support::collections or take a dependency on hashbrown directly.
  • bevy_utils::Entry has been removed. Instead, import from bevy_platform_support::collections::hash_map or bevy_platform_support::collections::hash_set as appropriate.
  • All of the above equally apply to bevy::utils and bevy::platform_support.

Notes

  • I left PreHashMap, PreHashMapExt, and TypeIdMap in bevy_utils as they might be candidates for micro-crating. They can always be moved into bevy_platform_support at a later date if desired.

@bushrat011899 bushrat011899 added C-Code-Quality A section of code that is hard to understand or change M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide A-Cross-Cutting Impacts the entire engine X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 20, 2025
@bushrat011899
Copy link
Contributor Author

Marking as X-Blessed for the same reasons outlined here.

@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Jan 21, 2025
@bushrat011899 bushrat011899 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Cross-Cutting Impacts the entire engine C-Code-Quality A section of code that is hard to understand or change D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants