Reflection should be fully optional and toggleable at a `bevy` level
- 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?
Reflection results in significant increases to compile times and binary size, and in many projects, is only useful as a development tool.
## What solution would you like?
`bevy_reflect` should be an optional dependency for all Bevy crates whenever possible,
and we should have a `reflect` feature flag on `bevy` itself that controls this.
Because of our setup, this will need to be mirrored to `bevy_internal`.
## What alternative(s) have you considered?
We could gate this behind the `debug` feature flag, as they serve similar roles, but not debug / dev applications of reflection exist.
## Additional context
I encountered this when trying to fix #20038. Because a top-level feature flag does not exist, there's not much point in doing this now: bevy_reflect will still be drawn into your tree and other crates will still have reflection information embedded.
Contributor guide
Assessment
This issue has not been assessed yet.