bevyengine / bevyengine/bevy

Reflection should be fully optional and toggleable at a `bevy` level

Open
#20,337 1 comment 8 reactions 0 assignees View on GitHub
A-Cross-Cutting A-Reflection C-Feature C-Performance D-Modest S-Ready-For-Implementation X-Contentious
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.