Architecture of bevyengine/bevy
bevyengine/bevy is 2,333 source files holding 52,674 symbols across 9 modules, written mainly in Rust, Kotlin, JavaScript. The largest module is crates, with 1,393 files, and 123 files are entry points into the dependency graph.
How bevy fits together
Bevy's engine features are split into small separate packages under crates, covering areas such as cameras, transforms, visibility, sprites, input focus, logging and the remote inspector. The public library entry point is src/lib.rs, which exposes the documented functionality that applications use. Applications create an App, add plugins such as DefaultPlugins, and call run. The examples directory holds runnable examples that show specific concepts, such as the breakout example. The benches directory contains Criterion benchmarks that time the engine crates. The tools directory holds helper programs for examples, documentation, generated assets and tests, and each package there has its own manifest.
Largest modules
- crates: 1,393 files and 410,315 lines of code
- examples: 471 files and 83,515 lines of code
- benches: 106 files and 8,935 lines of code
- tools: 35 files and 2,739 lines of code
- tests: 11 files and 1,272 lines of code
- .github: 5 files and 148 lines of code
- errors: 1 file and 18 lines of code
- src: 1 file and 19 lines of code
Languages
By file count: Rust 2,012 files, Kotlin 4 files, JavaScript 2 files, Makefile 2 files, Shell 2 files, TypeScript 2 files.
Documentation
Repowise documents bevy in 2,642 pages generated from the source, 100 of them written explanations of the repository and its modules. Module guides include:
- crates/bevy_animation/src: Animation Curves and Graphs
- crates/bevy_animation/macros/src: Animation Macros
- errors/src: Application Error Handling
- src: Application Library Entry
- crates/bevy_asset/src: Asset Change Tracking and Loaders
More on bevy: summary and FAQ, codebase overview, code health.
Related guide: Best dependency graph tools for monorepos