-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
A-Cross-CuttingImpacts the entire engineImpacts the entire engineA-ReflectionRuntime information about typesRuntime information about typesC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile timesD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!X-ContentiousThere are nontrivial implications that should be thought throughThere are nontrivial implications that should be thought through
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.
Pedro-0550, Jondolf, notmd, JusSchw, RCoder01 and 1 more
Metadata
Metadata
Assignees
Labels
A-Cross-CuttingImpacts the entire engineImpacts the entire engineA-ReflectionRuntime information about typesRuntime information about typesC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile timesD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!X-ContentiousThere are nontrivial implications that should be thought throughThere are nontrivial implications that should be thought through