bevyengine / bevyengine/bevy

Improve documentation for `DeserializeWithRegistry` and `SerializeWithRegistry`

Open Beginner friendly
#23,592 0 comments 0 reactions 0 assignees View on GitHub
A-Reflection C-Docs D-Straightforward S-Ready-For-Implementation X-Uncontroversial
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## How can Bevy's documentation be improved?

I think it's not very clear how to use these traits from their description. I only figured it out because of the unit tests inside `bevy_reflect`:

https://github.com/bevyengine/bevy/blob/4bbd37d4b052f4ed1db84a74a1e7bc20462a6943/crates/bevy_reflect/src/serde/mod.rs#L251-L333

For my game, I implemented deserialization using short names and allowing a string as shorthand for default deserialization:
https://github.com/simgine/simgine/blob/master/core/src/asset_manifest/reflected_component.rs

Scroll to the unit test to see how it works. Feel free to use it as an example in the Bevy docs 🙂

Contributor guide

Open the contributing guide

Research direction

Start with the unit tests in crates/bevy_reflect/src/serde/mod.rs, especially the section covering DeserializeWithRegistry and SerializeWithRegistry. Compare those examples with the traits' current descriptions and review the linked reflected_component.rs example for short-name and string shorthand usage. Done means the documentation explains how to use both traits with representative examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.