How bevyengine/bevy works
Bevy is a modular Rust game engine. A game developer configures an App with plugins and systems; the scheduler dispatches those systems over an ECS World, where queries, resources, events, observers, assets, animation, and input update game state. Extraction transfers relevant state into the render app, which specializes GPU pipelines, prepares UI and 2D/3D rendering, applies post-processing, and presents frames. The tree and excerpts directly support the ECS, asset, extraction, pipeline, UI, text, gizmo, meshlet, and post-process branches; some subsystem links remain intentionally coarse.
Main entry points: pipeline_cache.rs Pipeline Cache · system.rs Game Systems · mod.rs ECS World · lib.rs Render Extraction
Components 24
App Runtime
- App
crates/bevy_app/src/app.rs - Plugin System
crates/bevy_app/src/plugin.rs - Schedule Runner
crates/bevy_ecs/src/schedule/schedule.rs - Game Systems
crates/bevy_ecs/src/system/system.rs
ECS State
- ECS World
crates/bevy_ecs/src/world/mod.rs - Queries Commands
crates/bevy_ecs/src/query/mod.rs - Events Observers
crates/bevy_ecs/src/observer/mod.rs
Content Input
- Input Resources
crates/bevy_ecs/src/system/input.rs - Asset Server
crates/bevy_asset/src/server/mod.rs - Asset Sources
crates/bevy_asset/src/io/mod.rs - Animation Runtime
crates/bevy_animation/src/lib.rs
Rendering
- Camera Visibility
crates/bevy_camera/src/lib.rs - Render Extraction
crates/bevy_extract/src/lib.rs - Pipeline Cache
crates/bevy_render/src/render_resource/pipeline_cache.rs - 3D Meshlets
crates/bevy_pbr/src/meshlet/pipelines.rs - Gizmo Renderer
crates/bevy_gizmos_render/src/pipeline_3d.rs
Presentation
- UI Renderer
crates/bevy_ui_render/src/ui_material_pipeline.rs - UI Texture Slices
crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs - Text Layout
crates/bevy_text/src/pipeline.rs - Post Processing
crates/bevy_post_process/src/motion_blur/pipeline.rs - Audio Output
crates/bevy_audio/src/audio_output.rs
Other components
- Game Developer
- GPU Display
- Operating System
Connections 29
- Game Developer → App: configures
- App → Plugin System: adds plugins
- App → Schedule Runner: runs schedules
- Schedule Runner → Game Systems: dispatches
- Game Systems → Queries Commands: executes queries
- Queries Commands → ECS World: reads writes
- ECS World → Events Observers: triggers observers
- Operating System → Input Resources: provides input
- Input Resources → Game Systems: feeds systems
- Asset Server → Asset Sources: loads assets
- Game Systems → Asset Server: requests assets
- Animation Runtime → ECS World: updates components
- Asset Server → Animation Runtime: supplies assets
- ECS World → Render Extraction: extracts state
- Camera Visibility → Render Extraction: extracts views
- Render Extraction → UI Renderer: transfers UI
- Render Extraction → 3D Meshlets: transfers scene
- UI Renderer → Pipeline Cache: specializes pipelines
- UI Texture Slices → Pipeline Cache: specializes pipelines
- Text Layout → UI Renderer: provides glyphs
- Gizmo Renderer → Pipeline Cache: queues pipelines
- 3D Meshlets → Pipeline Cache: queues compute
- Post Processing → Pipeline Cache: specializes passes
- Pipeline Cache → GPU Display: creates GPU pipelines
- UI Renderer → GPU Display: renders UI
- 3D Meshlets → GPU Display: renders 3D
- Post Processing → GPU Display: composites effects
- Audio Output → Operating System: outputs sound
- GPU Display → Operating System: presents frames