Event Reflection
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## What problem does this solve or what need does it fill?
Support/Enforce reflection for events.
Otherwise the only way to dynamically interact with these things, is to manually register every event you'd want your app to interact with through the type registry yourself, but not all of them will implement reflection.
## What solution would you like?
- `App::add_event` should bound `T: Reflect` and register the involved types with the type registry (`Events`, `T`, etc..).
OR
- have `#[derive(Event)]#[event(Reflect)]` (or just a special `ReflectEvent` type data) macro functionality and implement it around bevy (less stringent, but also less likely to be useful).
OR
- Implement a sort of sub-genre of reflection specifically for events (only require ability to construct them, find them by name etc)
Contributor guide
Research direction
Start by reading App::add_event, the Event and Reflect derive functionality, and the type registry references in the issue. Compare the proposed approaches—bounding events by Reflect, adding event derive support, or introducing event-specific reflection—and define which event types and construction or lookup behavior must be supported before implementation.
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
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100