mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 14:10:19 +00:00
8b25ef3328
# Objective Allow the use of color definitions from Bevy in other contexts than pure Bevy apps, e.g. outside ECS use. In those cases it's nice to not have more dependencies than you need. ## Solution Hide use of reflection behind a feature flag. Defaults to on. ## Points to consider 1. This was straightforward _except_ for the `crates/bevy_color/src/lib.rs` change where I removed `Reflect` as a bound. That is awkward to have feature gated since features should be additive. If the bound was added as part of the feature flag, the result would be _more_ restrictive, and _disable_ impls which did not have the impl. On the other hand having the reflect bound there unconditionally would defeat the purpose of the PR. I opted to remove the bound since it seems overly restrictive anyway. 2. It's possible to hide `encase` and `bytemuck` behind the new feature flag too (or a separate one). I'm thinking if `bevy-support` is not desired then it's unlikely that the user has need of those. --------- Signed-off-by: Torstein Grindvik <torstein.grindvik@muybridge.com> Co-authored-by: Torstein Grindvik <torstein.grindvik@muybridge.com> |
||
---|---|---|
.. | ||
crates/gen_tests | ||
docs | ||
src | ||
Cargo.toml | ||
README.md |