Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 122 additions & 20 deletions benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,41 @@ autobenches = false
criterion = { version = "0.8.0", features = ["html_reports"] }
seq-macro = "0.3.6"

[dev-dependencies]
# Bevy crates
bevy_app = { path = "../crates/bevy_app" }
bevy_curve = { path = "../crates/bevy_curve" }
bevy_ecs = { path = "../crates/bevy_ecs", features = ["multi_threaded"] }
bevy_extract = { path = "../crates/bevy_extract" }
bevy_math = { path = "../crates/bevy_math" }
bevy_shape = { path = "../crates/bevy_shape" }
bevy_picking = { path = "../crates/bevy_picking", features = ["mesh_picking"] }
bevy_reflect = { path = "../crates/bevy_reflect", features = ["functions"] }
bevy_camera = { path = "../crates/bevy_camera" }
bevy_mesh = { path = "../crates/bevy_mesh" }
bevy_asset = { path = "../crates/bevy_asset" }
bevy_render = { path = "../crates/bevy_render" }
bevy_scene = { path = "../crates/bevy_scene" }
bevy_tasks = { path = "../crates/bevy_tasks" }
bevy_text = { path = "../crates/bevy_text" }
bevy_transform = { path = "../crates/bevy_transform" }
bevy_ui = { path = "../crates/bevy_ui" }
bevy_ui_widgets = { path = "../crates/bevy_ui_widgets" }
bevy_platform = { path = "../crates/bevy_platform", default-features = false, features = [

bevy_app = { path = "../crates/bevy_app", optional = true }
bevy_curve = { path = "../crates/bevy_curve", optional = true }
bevy_ecs = { path = "../crates/bevy_ecs", optional = true, features = [
"multi_threaded",
] }
bevy_extract = { path = "../crates/bevy_extract", optional = true }
bevy_math = { path = "../crates/bevy_math", optional = true }
bevy_shape = { path = "../crates/bevy_shape", optional = true }
bevy_picking = { path = "../crates/bevy_picking", optional = true, features = [
"mesh_picking",
] }
bevy_reflect = { path = "../crates/bevy_reflect", optional = true, features = [
"functions",
] }
bevy_camera = { path = "../crates/bevy_camera", optional = true }
bevy_mesh = { path = "../crates/bevy_mesh", optional = true }
bevy_asset = { path = "../crates/bevy_asset", optional = true }
bevy_render = { path = "../crates/bevy_render", optional = true }
bevy_scene = { path = "../crates/bevy_scene", optional = true }
bevy_tasks = { path = "../crates/bevy_tasks", optional = true }
bevy_text = { path = "../crates/bevy_text", optional = true }
bevy_transform = { path = "../crates/bevy_transform", optional = true }
bevy_ui = { path = "../crates/bevy_ui", optional = true }
bevy_ui_widgets = { path = "../crates/bevy_ui_widgets", optional = true }
bevy_platform = { path = "../crates/bevy_platform", optional = true, default-features = false, features = [
"std",
"bytemuck",
] }

# Other crates
glam = { version = "0.33.2", default-features = false, features = [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the rest of these still be considered [dev-dependencies]?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume they're small enough (relative to the Bevy crates) that it doesn't really matter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't really matter if they're in dev-dependencies or dependencies. This crate is only ever run through cargo bench which compiles with the dev-dependcies.

"std",
"all-types",
"rand",
"bytemuck",
] }
Expand All @@ -52,6 +59,89 @@ bytemuck = { version = "1", default-features = false, features = [
"must_cast",
] }

[features]
default = [
"bench_camera",
"bench_ecs",
"bench_math",
"bench_picking",
"bench_platform",
"bench_reflect",
"bench_render",
"bench_scene",
"bench_tasks",
"bench_transform",
]

bench_camera = ["dep:bevy_camera", "dep:bevy_math", "dep:bevy_shape"]

bench_ecs = [
"dep:bevy_ecs",
"dep:bevy_app",
"dep:bevy_math",
"dep:bevy_reflect",
"dep:bevy_tasks",
"bevy_math/bevy_reflect",
]

bench_math = ["dep:bevy_math", "dep:bevy_curve", "dep:bevy_shape"]

bench_picking = ["dep:bevy_picking", "dep:bevy_math", "dep:bevy_shape"]

bench_platform = [
"dep:bevy_platform",
"dep:bevy_math",
"bytemuck/min_const_generics",
]

bench_reflect = ["dep:bevy_reflect", "dep:bevy_platform"]

bench_render = [
"dep:bevy_render",
"dep:bevy_app",
"dep:bevy_asset",
"dep:bevy_camera",
"dep:bevy_ecs",
"dep:bevy_extract",
"dep:bevy_mesh",
"dep:bevy_reflect",
]

bench_scene = [
"dep:bevy_scene",
"dep:bevy_app",
"dep:bevy_asset",
"dep:bevy_ecs",
"dep:bevy_ui",
"dep:bevy_ui_widgets",
"dep:bevy_reflect",
]

bench_tasks = ["dep:bevy_tasks"]

bench_text = [
"dep:bevy_text",
"dep:bevy_app",
"dep:bevy_asset",
"dep:bevy_ecs",
"dep:bevy_math",
]

bench_transform = [
"dep:bevy_transform",
"dep:bevy_ecs",
"dep:bevy_math",
"dep:bevy_tasks",
]

bench_ui = [
"dep:bevy_ui",
"dep:bevy_app",
"dep:bevy_camera",
"dep:bevy_ecs",
"dep:bevy_text",
]

[lints.clippy]
doc_markdown = "warn"
manual_let_else = "warn"
Expand Down Expand Up @@ -92,58 +182,70 @@ bench = false
name = "ecs"
path = "benches/bevy_ecs/main.rs"
harness = false
required-features = ["bench_ecs"]

[[bench]]
name = "math"
path = "benches/bevy_math/main.rs"
harness = false
required-features = ["bench_math"]

[[bench]]
name = "picking"
path = "benches/bevy_picking/main.rs"
harness = false
required-features = ["bench_picking"]

[[bench]]
name = "reflect"
path = "benches/bevy_reflect/main.rs"
harness = false
required-features = ["bench_reflect"]

[[bench]]
name = "render"
path = "benches/bevy_render/main.rs"
harness = false
required-features = ["bench_render"]

[[bench]]
name = "scene"
path = "benches/bevy_scene/main.rs"
harness = false
required-features = ["bench_scene"]

[[bench]]
name = "tasks"
path = "benches/bevy_tasks/main.rs"
harness = false
required-features = ["bench_tasks"]

[[bench]]
name = "camera"
path = "benches/bevy_camera/main.rs"
harness = false
required-features = ["bench_camera"]

[[bench]]
name = "transform"
path = "benches/bevy_transform/main.rs"
harness = false
required-features = ["bench_transform"]

[[bench]]
name = "platform"
path = "benches/bevy_platform/main.rs"
harness = false
required-features = ["bench_platform"]

[[bench]]
name = "ui"
path = "benches/bevy_ui/main.rs"
harness = false
required-features = ["bench_ui"]

[[bench]]
name = "text"
path = "benches/bevy_text/main.rs"
harness = false
required-features = ["bench_text"]
Loading