| description | globs | alwaysApply | 
|---|---|---|
| Check Bevy source code locally for accurate API information | true | 
When working with Bevy, always check the LOCAL source code and documentation to ensure version accuracy.
- HTML Docs: target/doc/bevy/index.html
- Generate: cargo doc --package bevy --open
- All deps: cargo doc --open
The exact Bevy version used in this project is available locally:
- Main crate: ~/.cargo/registry/src/index.crates.io-*/bevy-0.16.1/
- Individual crates: Each Bevy module is a separate crate:
- bevy_ecs-0.16.1/- Entity Component System
- bevy_app-0.16.1/- Application framework
- bevy_render-0.16.1/- Rendering pipeline
- bevy_sprite-0.16.1/- 2D sprites
- bevy_transform-0.16.1/- Transform components
- And many more in ~/.cargo/registry/src/index.crates.io-*/bevy_*
 
# Search across ALL Bevy crates for a struct/trait/function
rg "struct ComponentId" ~/.cargo/registry/src/index.crates.io-*/bevy*0.16.1/
# Search in specific Bevy crate
rg "System" ~/.cargo/registry/src/index.crates.io-*/bevy_ecs-0.16.1/
# Check current Bevy version
grep "^name = \"bevy\"" Cargo.lock -A 1
# Open specific module docs
cargo doc --package bevy_ecs --open- Version Match: Local source matches EXACTLY what your project uses
- No Network: Faster access, works offline
- Consistency: Avoids API breaking changes between versions
- Complete: Includes all dependencies with correct versions
Bevy moves fast and breaks APIs between versions. Always prefer local source over web resources to avoid version mismatch errors.