bevy/crates/bevy_ecs/src
Lee-Orr 42ba9dfaea
Separate state crate (#13216)
# Objective

Extracts the state mechanisms into a new crate called "bevy_state".

This comes with a few goals:

- state wasn't really an inherent machinery of the ecs system, and so
keeping it within bevy_ecs felt forced
- by mixing it in with bevy_ecs, the maintainability of our more robust
state system was significantly compromised

moving state into a new crate makes it easier to encapsulate as it's own
feature, and easier to read and understand since it's no longer a
single, massive file.

## Solution

move the state-related elements from bevy_ecs to a new crate

## Testing

- Did you test these changes? If so, how? all the automated tests
migrated and passed, ran the pre-existing examples without changes to
validate.

---

## Migration Guide

Since bevy_state is now gated behind the `bevy_state` feature, projects
that use state but don't use the `default-features` will need to add
that feature flag.

Since it is no longer part of bevy_ecs, projects that use bevy_ecs
directly will need to manually pull in `bevy_state`, trigger the
StateTransition schedule, and handle any of the elements that bevy_app
currently sets up.

---------

Co-authored-by: Kristoffer Søholm <k.soeholm@gmail.com>
2024-05-09 18:06:05 +00:00
..
entity Fix beta lints (#12980) 2024-04-16 02:46:46 +00:00
identifier Fix beta lints (#12980) 2024-04-16 02:46:46 +00:00
query multi_threaded feature rename (#12997) 2024-05-06 20:49:32 +00:00
reflect Make from_reflect_or_world also try ReflectDefault and improve some comments and panic messages (#12499) 2024-04-30 00:48:46 +00:00
schedule Separate state crate (#13216) 2024-05-09 18:06:05 +00:00
storage Fix uses of "it's" vs "its". (#13033) 2024-04-19 18:17:31 +00:00
system add schedule docs (#13174) 2024-05-02 18:31:32 +00:00
world Fix uses of "it's" vs "its". (#13033) 2024-04-19 18:17:31 +00:00
archetype.rs Adding some docs for archetype internals (#12578) 2024-03-23 01:48:31 +00:00
batching.rs Parallel event reader (#12554) 2024-04-22 16:37:42 +00:00
bundle.rs Fix uses of "it's" vs "its". (#13033) 2024-04-19 18:17:31 +00:00
change_detection.rs Update docs of set_if_neq and replace_if_neq (#12919) 2024-04-15 12:38:38 +00:00
component.rs Fix uses of "it's" vs "its". (#13033) 2024-04-19 18:17:31 +00:00
event.rs Add color conversions #13224 (#13276) 2024-05-09 18:01:52 +00:00
intern.rs Moves intern and label modules into bevy_ecs (#12772) 2024-04-08 15:34:11 +00:00
label.rs Use ptr::from_ref and ptr::addr_eq in macro (#13081) 2024-04-24 01:54:24 +00:00
lib.rs Separate state crate (#13216) 2024-05-09 18:06:05 +00:00
removal_detection.rs Add RemovedComponentEvents::iter (#12815) 2024-04-01 20:20:30 +00:00