bevyengine / bevyengine/bevy

Improve label-defining component registration ergonomics

Open
#25,023 0 comments 0 reactions 0 assignees View on GitHub
A-Dev-Tools A-ECS D-Modest S-Needs-Design X-Contentious
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

Eventually I would like to see the registration as a derive macro, similar to how hooks are registered.

_Originally posted by @viridia in https://github.com/bevyengine/bevy/pull/25007#pullrequestreview-4711131057_

This requires some careful thought in terms of code-organization. Doing so would require us to move the label resolution code deep into the dependency tree, probably in bevy_ecs. That's probably a fine move given the value of having everything declare their own priorities ergonomically, but it should be feature-gated.

We could even add this to the `Component` derive (feature-gated please!) if we did so, sparing us from another type-registry type of pass.

Contributor guide

Open the contributing guide

Research direction

Start by reading the label registration discussion referenced from pull request #25007 and inspect the existing registration and label-resolution organization around bevy_ecs. Compare the proposed derive-macro and Component-derive approaches, including feature-gating; done would require an agreed design and implementation plan, but the issue does not define a concrete completion test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.