Skip to content

Use recommended Cargo.toml from Bevy docs #1

@laundmo

Description

@laundmo

I've just stumbled across your guide, and noticed something crucial missing from it: optimizations for debug builds.

Bevy documents this here: https://bevy.org/learn/quick-start/getting-started/setup/#compile-with-performance-optimizations

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.

The recommended step to resolve this is adding the following to 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 = 3

I think it would be great if you could update both your articles, and this repo, to include this, to help readers avoid this footgun.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions