On this page
cargo init bevy-basiccd bevy-basiccargo add bevyCompile with Performance Optimizations#
While it may not be an issue for simple projects, debug builds in Rust can be very slow - especially when you start using Bevy to make real games.
It’s not uncommon for debug builds using the default configuration to take multiple minutes to load large 3D models, or for the framerate for simple scenes to drop to near-unplayable levels.
Fortunately, there is a simple fix, and we don’t have to give up our fast iterative compiles! Add the following to your Cargo.toml:
# Enable a small amount of optimization in the dev profile.[profile.dev]opt-level = 1
# Enable a large amount of optimization in the dev profile for dependencies.[profile.dev.package."*"]opt-level = 3Apps
Every Bevy program can be referred to as an App. The simplest Bevy app looks like this:
use bevy::prelude::*;
fn main() { App::new().run();}https://www.youtube.com/watch?v=nE76GGICofU