Files
laund f0dbbcc303 bsn: improve docs and add tests (#24464)
# Objective

Improve documentation of bevy_scene/bsn.

Rendered: https://share.yadamiel.com/docs/doc/bevy/scene/index.html

Closes: #24299
Closes: #24540
Closes: #24541

## Solution

This PR depends on/includes changes from 
- #24402

Docs changes (approx)

- removing confusing `Inheritance` concept in favour of caching
    - #24367
- fix now-changed syntax
    - #24367
- cleaning up the duplication between macro docs and module docs
- clean up the syntax snippet to be a single table
- a bunch of smaller fixes

## Testing

- `cargo doc -Zrustdoc-mergeable-info -p bevy_scene --lib` locally works
fine
- the other cargo doc command also works fine (see cargo.toml diff for
full command, its *ugh*)


## Todo
- [x] show how scenes actually get evaluated, not a full expansion but a
rough idea of it
- [ ] come up with something better for the macro inline docs than a
complex example macro call
- [x] probably remove the #24402 commits again, they're annoying to have
in the history

---------

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2026-06-08 22:44:03 +00:00
..

Docs.rs Extensions

This directory includes some templates and styling to extend and modify rustdoc's output for Bevy's documentation on docs.rs. Currently this consists of tags indicating core bevy_ecs traits.

3rd Party Crates

To use in your own crate, first copy this folder into your project, then add the following to your Cargo.toml:

[package.metadata.docs.rs]
rustc-args = ["--cfg", "docsrs_dep"]
rustdoc-args = [
    "--cfg", "docsrs_dep",
    "--html-after-content", "docs-rs/trait-tags.html",
]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docsrs_dep)'] }

Local Testing

Build the documentation with the extension enabled like this:

RUSTDOCFLAGS="--html-after-content docs-rs/trait-tags.html --cfg docsrs_dep" RUSTFLAGS="--cfg docsrs_dep" cargo doc --no-deps --package <package_name>