Remove or shrink bevy_utils
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
`bevy_utils` is a collection of unrelated utilities for Bevy. Utility modules/classes/libraries are generally frowned upon in the programming community since they are most likely a sign of poor organization.
## What solution would you like?
Move `bevy_utils`'s contents into existing bevy crates or into separate crates.
### Long list of what to do with each item in `bevy_utils`
- [ ] `BoxedFuture` could probably be removed since async in traits were added in Rust 1.75
- [ ] all `HashMap` related stuff: no idea where to put that.
- [x] https://github.com/bevyengine/bevy/pull/11498
- [ ] `OnDrop` could be its own crate
- [ ] `tracing` related stuff: put in `bevy_log`
- [ ] `once` related stuff: I would put it in `bevy_log`, but this could cause some issues (see https://github.com/bevyengine/bevy/pull/11419)
- [ ] `get_short_name`: put in `bevy_reflect`
- [ ] `SyncCell`: use `std::sync::Exclusive` when stabilized (https://github.com/rust-lang/rust/issues/98407)
- [ ] `SyncUnsafeCell`: use `std::cell::SyncUnsafeCell` when stablized (https://github.com/rust-lang/rust/issues/95439)
- [x] `generate_composite_uuid`: Maybe contribute this to the `uuid` crate?
- [x] `label` module: Sounds like a `bevy_reflect` thing but isn't actually used anywhere there so idk
- [x] `Interned`: put in `bevy_ecs`
- [ ] `futures` module: only used in `bevy_render`, so put it there.
- [x] `FloatOrd`: could be its own crate
- [ ] `default`: Could be its own crate (The [`default` crate](https://crates.io/crates/default) already exists, so maybe we should use that)
- [ ] `CowArc`: Could be its own crate
Contributor guide
Assessment
This issue has not been assessed yet.