From e2810085a8d6fe98c06cfd3a3de853f2582ffa9a Mon Sep 17 00:00:00 2001 From: atlv Date: Mon, 7 Jul 2025 16:10:33 -0400 Subject: [PATCH] remove unused dependencies (#19998) # Objective - dont depend on things we dont need tp ## Solution - just dont do it ## Testing - 3d_scene runs --- crates/bevy_animation/Cargo.toml | 1 - crates/bevy_audio/Cargo.toml | 1 - crates/bevy_core_pipeline/Cargo.toml | 3 --- crates/bevy_core_widgets/Cargo.toml | 2 -- crates/bevy_dev_tools/Cargo.toml | 2 -- crates/bevy_diagnostic/Cargo.toml | 1 - crates/bevy_gilrs/Cargo.toml | 1 - crates/bevy_gizmos/macros/Cargo.toml | 1 - crates/bevy_gltf/Cargo.toml | 1 - crates/bevy_input/Cargo.toml | 1 - crates/bevy_light/Cargo.toml | 2 -- crates/bevy_mesh/Cargo.toml | 1 - crates/bevy_pbr/Cargo.toml | 5 +---- crates/bevy_picking/Cargo.toml | 1 - crates/bevy_reflect/derive/Cargo.toml | 1 - crates/bevy_state/macros/Cargo.toml | 1 - crates/bevy_ui/Cargo.toml | 2 -- crates/bevy_ui_render/Cargo.toml | 13 +------------ crates/bevy_window/Cargo.toml | 10 +--------- crates/bevy_winit/Cargo.toml | 3 --- 20 files changed, 3 insertions(+), 50 deletions(-) diff --git a/crates/bevy_animation/Cargo.toml b/crates/bevy_animation/Cargo.toml index a5de22f1a4..731a6c7c4f 100644 --- a/crates/bevy_animation/Cargo.toml +++ b/crates/bevy_animation/Cargo.toml @@ -14,7 +14,6 @@ bevy_app = { path = "../bevy_app", version = "0.17.0-dev" } bevy_asset = { path = "../bevy_asset", version = "0.17.0-dev" } bevy_color = { path = "../bevy_color", version = "0.17.0-dev" } bevy_derive = { path = "../bevy_derive", version = "0.17.0-dev" } -bevy_log = { path = "../bevy_log", version = "0.17.0-dev" } bevy_math = { path = "../bevy_math", version = "0.17.0-dev" } bevy_mesh = { path = "../bevy_mesh", version = "0.17.0-dev" } bevy_reflect = { path = "../bevy_reflect", version = "0.17.0-dev", features = [ diff --git a/crates/bevy_audio/Cargo.toml b/crates/bevy_audio/Cargo.toml index 2ffa62db9d..8beba77c0d 100644 --- a/crates/bevy_audio/Cargo.toml +++ b/crates/bevy_audio/Cargo.toml @@ -16,7 +16,6 @@ bevy_ecs = { path = "../bevy_ecs", version = "0.17.0-dev" } bevy_math = { path = "../bevy_math", version = "0.17.0-dev" } bevy_reflect = { path = "../bevy_reflect", version = "0.17.0-dev" } bevy_transform = { path = "../bevy_transform", version = "0.17.0-dev" } -bevy_derive = { path = "../bevy_derive", version = "0.17.0-dev" } # other # TODO: Remove `coreaudio-sys` dep below when updating `cpal`. diff --git a/crates/bevy_core_pipeline/Cargo.toml b/crates/bevy_core_pipeline/Cargo.toml index 837869bc07..63513787f8 100644 --- a/crates/bevy_core_pipeline/Cargo.toml +++ b/crates/bevy_core_pipeline/Cargo.toml @@ -24,7 +24,6 @@ bevy_app = { path = "../bevy_app", version = "0.17.0-dev" } bevy_asset = { path = "../bevy_asset", version = "0.17.0-dev" } bevy_color = { path = "../bevy_color", version = "0.17.0-dev" } bevy_derive = { path = "../bevy_derive", version = "0.17.0-dev" } -bevy_diagnostic = { path = "../bevy_diagnostic", version = "0.17.0-dev" } bevy_ecs = { path = "../bevy_ecs", version = "0.17.0-dev" } bevy_image = { path = "../bevy_image", version = "0.17.0-dev" } bevy_camera = { path = "../bevy_camera", version = "0.17.0-dev" } @@ -39,14 +38,12 @@ bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-fea "serialize", ] } -serde = { version = "1", features = ["derive"] } bitflags = "2.3" radsort = "0.1" nonmax = "0.5" smallvec = { version = "1", default-features = false } thiserror = { version = "2", default-features = false } tracing = { version = "0.1", default-features = false, features = ["std"] } -bytemuck = { version = "1" } [lints] workspace = true diff --git a/crates/bevy_core_widgets/Cargo.toml b/crates/bevy_core_widgets/Cargo.toml index 57e2968e22..186b2ec820 100644 --- a/crates/bevy_core_widgets/Cargo.toml +++ b/crates/bevy_core_widgets/Cargo.toml @@ -18,8 +18,6 @@ bevy_input_focus = { path = "../bevy_input_focus", version = "0.17.0-dev" } bevy_log = { path = "../bevy_log", version = "0.17.0-dev" } bevy_math = { path = "../bevy_math", version = "0.17.0-dev" } bevy_picking = { path = "../bevy_picking", version = "0.17.0-dev" } -bevy_render = { path = "../bevy_render", version = "0.17.0-dev" } -bevy_transform = { path = "../bevy_transform", version = "0.17.0-dev" } bevy_ui = { path = "../bevy_ui", version = "0.17.0-dev", features = [ "bevy_ui_picking_backend", ] } diff --git a/crates/bevy_dev_tools/Cargo.toml b/crates/bevy_dev_tools/Cargo.toml index ef31767c0e..3f0efb1c21 100644 --- a/crates/bevy_dev_tools/Cargo.toml +++ b/crates/bevy_dev_tools/Cargo.toml @@ -18,14 +18,12 @@ bevy_asset = { path = "../bevy_asset", version = "0.17.0-dev" } bevy_color = { path = "../bevy_color", version = "0.17.0-dev" } bevy_diagnostic = { path = "../bevy_diagnostic", version = "0.17.0-dev" } bevy_ecs = { path = "../bevy_ecs", version = "0.17.0-dev" } -bevy_input = { path = "../bevy_input", version = "0.17.0-dev" } bevy_picking = { path = "../bevy_picking", version = "0.17.0-dev" } bevy_render = { path = "../bevy_render", version = "0.17.0-dev" } bevy_reflect = { path = "../bevy_reflect", version = "0.17.0-dev" } bevy_time = { path = "../bevy_time", version = "0.17.0-dev" } bevy_text = { path = "../bevy_text", version = "0.17.0-dev" } bevy_ui = { path = "../bevy_ui", version = "0.17.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.17.0-dev" } bevy_window = { path = "../bevy_window", version = "0.17.0-dev" } bevy_state = { path = "../bevy_state", version = "0.17.0-dev" } diff --git a/crates/bevy_diagnostic/Cargo.toml b/crates/bevy_diagnostic/Cargo.toml index e930da149a..424ca67437 100644 --- a/crates/bevy_diagnostic/Cargo.toml +++ b/crates/bevy_diagnostic/Cargo.toml @@ -56,7 +56,6 @@ critical-section = [ bevy_app = { path = "../bevy_app", version = "0.17.0-dev", default-features = false } bevy_ecs = { path = "../bevy_ecs", version = "0.17.0-dev", default-features = false } bevy_time = { path = "../bevy_time", version = "0.17.0-dev", default-features = false } -bevy_utils = { path = "../bevy_utils", version = "0.17.0-dev", default-features = false } bevy_tasks = { path = "../bevy_tasks", version = "0.17.0-dev", default-features = false } bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-features = false, features = [ "alloc", diff --git a/crates/bevy_gilrs/Cargo.toml b/crates/bevy_gilrs/Cargo.toml index afb20318bc..7effc016c4 100644 --- a/crates/bevy_gilrs/Cargo.toml +++ b/crates/bevy_gilrs/Cargo.toml @@ -13,7 +13,6 @@ keywords = ["bevy"] bevy_app = { path = "../bevy_app", version = "0.17.0-dev" } bevy_ecs = { path = "../bevy_ecs", version = "0.17.0-dev" } bevy_input = { path = "../bevy_input", version = "0.17.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.17.0-dev" } bevy_time = { path = "../bevy_time", version = "0.17.0-dev" } bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-features = false, features = [ "std", diff --git a/crates/bevy_gizmos/macros/Cargo.toml b/crates/bevy_gizmos/macros/Cargo.toml index b7effe24b0..f4273f05ed 100644 --- a/crates/bevy_gizmos/macros/Cargo.toml +++ b/crates/bevy_gizmos/macros/Cargo.toml @@ -16,7 +16,6 @@ proc-macro = true bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.17.0-dev" } syn = "2.0" -proc-macro2 = "1.0" quote = "1.0" [lints] diff --git a/crates/bevy_gltf/Cargo.toml b/crates/bevy_gltf/Cargo.toml index e35d7771f5..7c4216d889 100644 --- a/crates/bevy_gltf/Cargo.toml +++ b/crates/bevy_gltf/Cargo.toml @@ -36,7 +36,6 @@ bevy_scene = { path = "../bevy_scene", version = "0.17.0-dev", features = [ ] } bevy_transform = { path = "../bevy_transform", version = "0.17.0-dev" } bevy_tasks = { path = "../bevy_tasks", version = "0.17.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.17.0-dev" } bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-features = false, features = [ "std", "serialize", diff --git a/crates/bevy_input/Cargo.toml b/crates/bevy_input/Cargo.toml index 7c69aad54a..c32a87a52d 100644 --- a/crates/bevy_input/Cargo.toml +++ b/crates/bevy_input/Cargo.toml @@ -63,7 +63,6 @@ libm = ["bevy_math/libm"] bevy_app = { path = "../bevy_app", version = "0.17.0-dev", default-features = false } bevy_ecs = { path = "../bevy_ecs", version = "0.17.0-dev", default-features = false } bevy_math = { path = "../bevy_math", version = "0.17.0-dev", default-features = false } -bevy_utils = { path = "../bevy_utils", version = "0.17.0-dev", default-features = false } bevy_reflect = { path = "../bevy_reflect", version = "0.17.0-dev", features = [ "glam", ], default-features = false, optional = true } diff --git a/crates/bevy_light/Cargo.toml b/crates/bevy_light/Cargo.toml index 0dd7e158c8..6a3807f9bb 100644 --- a/crates/bevy_light/Cargo.toml +++ b/crates/bevy_light/Cargo.toml @@ -19,7 +19,6 @@ bevy_reflect = { path = "../bevy_reflect", version = "0.17.0-dev" } bevy_camera = { path = "../bevy_camera", version = "0.17.0-dev" } bevy_ecs = { path = "../bevy_ecs", version = "0.17.0-dev" } bevy_transform = { path = "../bevy_transform", version = "0.17.0-dev" } -bevy_derive = { path = "../bevy_derive", version = "0.17.0-dev" } bevy_utils = { path = "../bevy_utils", version = "0.17.0-dev" } bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev" } bevy_color = { path = "../bevy_color", version = "0.17.0-dev", features = [ @@ -27,7 +26,6 @@ bevy_color = { path = "../bevy_color", version = "0.17.0-dev", features = [ ] } # other -serde = { version = "1", default-features = false, features = ["derive"] } tracing = { version = "0.1", default-features = false } [features] diff --git a/crates/bevy_mesh/Cargo.toml b/crates/bevy_mesh/Cargo.toml index a34b0e7436..0f37ac1141 100644 --- a/crates/bevy_mesh/Cargo.toml +++ b/crates/bevy_mesh/Cargo.toml @@ -18,7 +18,6 @@ bevy_ecs = { path = "../bevy_ecs", version = "0.17.0-dev" } bevy_transform = { path = "../bevy_transform", version = "0.17.0-dev" } bevy_mikktspace = { path = "../bevy_mikktspace", version = "0.17.0-dev" } bevy_derive = { path = "../bevy_derive", version = "0.17.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.17.0-dev" } bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-features = false, features = [ "std", "serialize", diff --git a/crates/bevy_pbr/Cargo.toml b/crates/bevy_pbr/Cargo.toml index 9e10c9387e..299c0f54c3 100644 --- a/crates/bevy_pbr/Cargo.toml +++ b/crates/bevy_pbr/Cargo.toml @@ -21,7 +21,7 @@ pbr_light_textures = [] shader_format_glsl = ["bevy_render/shader_format_glsl"] trace = ["bevy_render/trace"] # Enables the meshlet renderer for dense high-poly scenes (experimental) -meshlet = ["dep:lz4_flex", "dep:range-alloc", "dep:half", "dep:bevy_tasks"] +meshlet = ["dep:lz4_flex", "dep:range-alloc", "dep:bevy_tasks"] # Enables processing meshes into meshlet meshes meshlet_processor = [ "meshlet", @@ -51,7 +51,6 @@ bevy_camera = { path = "../bevy_camera", version = "0.17.0-dev" } bevy_tasks = { path = "../bevy_tasks", version = "0.17.0-dev", optional = true } bevy_transform = { path = "../bevy_transform", version = "0.17.0-dev" } bevy_utils = { path = "../bevy_utils", version = "0.17.0-dev" } -bevy_window = { path = "../bevy_window", version = "0.17.0-dev" } bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-features = false, features = [ "std", ] } @@ -66,14 +65,12 @@ lz4_flex = { version = "0.11", default-features = false, features = [ "frame", ], optional = true } range-alloc = { version = "0.1.3", optional = true } -half = { version = "2", features = ["bytemuck"], optional = true } meshopt = { version = "0.4.1", optional = true } metis = { version = "0.2", optional = true } itertools = { version = "0.14", optional = true } bitvec = { version = "1", optional = true } # direct dependency required for derive macro bytemuck = { version = "1", features = ["derive", "must_cast"] } -radsort = "0.1" smallvec = { version = "1", default-features = false } nonmax = "0.5" static_assertions = "1" diff --git a/crates/bevy_picking/Cargo.toml b/crates/bevy_picking/Cargo.toml index ac18b1dd89..9053f48188 100644 --- a/crates/bevy_picking/Cargo.toml +++ b/crates/bevy_picking/Cargo.toml @@ -24,7 +24,6 @@ bevy_reflect = { path = "../bevy_reflect", version = "0.17.0-dev" } bevy_render = { path = "../bevy_render", version = "0.17.0-dev" } bevy_time = { path = "../bevy_time", version = "0.17.0-dev" } bevy_transform = { path = "../bevy_transform", version = "0.17.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.17.0-dev" } bevy_window = { path = "../bevy_window", version = "0.17.0-dev" } bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-features = false, features = [ "std", diff --git a/crates/bevy_reflect/derive/Cargo.toml b/crates/bevy_reflect/derive/Cargo.toml index b9eaa369cd..19875633ed 100644 --- a/crates/bevy_reflect/derive/Cargo.toml +++ b/crates/bevy_reflect/derive/Cargo.toml @@ -24,7 +24,6 @@ indexmap = "2.0" proc-macro2 = "1.0" quote = "1.0" syn = { version = "2.0", features = ["full", "extra-traits"] } -uuid = { version = "1.13.1", features = ["v4"] } [target.'cfg(target_arch = "wasm32")'.dependencies] # TODO: Assuming all wasm builds are for the browser. Require `no_std` support to break assumption. diff --git a/crates/bevy_state/macros/Cargo.toml b/crates/bevy_state/macros/Cargo.toml index 2ab531a9b2..a4ff416632 100644 --- a/crates/bevy_state/macros/Cargo.toml +++ b/crates/bevy_state/macros/Cargo.toml @@ -13,7 +13,6 @@ bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.17.0-dev" } syn = { version = "2.0", features = ["full"] } quote = "1.0" -proc-macro2 = "1.0" [lints] workspace = true diff --git a/crates/bevy_ui/Cargo.toml b/crates/bevy_ui/Cargo.toml index 86297f6df6..a26821a20c 100644 --- a/crates/bevy_ui/Cargo.toml +++ b/crates/bevy_ui/Cargo.toml @@ -36,10 +36,8 @@ bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-fea taffy = { version = "0.7" } serde = { version = "1", features = ["derive"], optional = true } uuid = { version = "1.1", features = ["v4"], optional = true } -bytemuck = { version = "1.5", features = ["derive"] } thiserror = { version = "2", default-features = false } derive_more = { version = "2", default-features = false, features = ["from"] } -nonmax = "0.5" smallvec = { version = "1", default-features = false } accesskit = "0.19" tracing = { version = "0.1", default-features = false, features = ["std"] } diff --git a/crates/bevy_ui_render/Cargo.toml b/crates/bevy_ui_render/Cargo.toml index 249372c7f0..309e33ce40 100644 --- a/crates/bevy_ui_render/Cargo.toml +++ b/crates/bevy_ui_render/Cargo.toml @@ -23,7 +23,6 @@ bevy_render = { path = "../bevy_render", version = "0.17.0-dev" } bevy_sprite = { path = "../bevy_sprite", version = "0.17.0-dev" } bevy_picking = { path = "../bevy_picking", version = "0.17.0-dev", optional = true } bevy_transform = { path = "../bevy_transform", version = "0.17.0-dev" } -bevy_window = { path = "../bevy_window", version = "0.17.0-dev" } bevy_utils = { path = "../bevy_utils", version = "0.17.0-dev" } bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-features = false, features = [ "std", @@ -32,23 +31,13 @@ bevy_ui = { path = "../bevy_ui", version = "0.17.0-dev" } bevy_text = { path = "../bevy_text", version = "0.17.0-dev", default-features = false } # other -serde = { version = "1", features = ["derive"], optional = true } bytemuck = { version = "1.5", features = ["derive"] } -thiserror = { version = "2", default-features = false } derive_more = { version = "1", default-features = false, features = ["from"] } -nonmax = "0.5" -smallvec = { version = "1", default-features = false } -accesskit = "0.18" tracing = { version = "0.1", default-features = false, features = ["std"] } [features] default = [] -serialize = [ - "serde", - "smallvec/serde", - "bevy_math/serialize", - "bevy_platform/serialize", -] +serialize = ["bevy_math/serialize", "bevy_platform/serialize"] bevy_ui_picking_backend = ["bevy_picking"] bevy_ui_debug = [] diff --git a/crates/bevy_window/Cargo.toml b/crates/bevy_window/Cargo.toml index 1a5bca6916..2cd96053b4 100644 --- a/crates/bevy_window/Cargo.toml +++ b/crates/bevy_window/Cargo.toml @@ -22,12 +22,7 @@ bevy_reflect = [ ] ## Adds serialization support through `serde`. -serialize = [ - "serde", - "smol_str/serde", - "bevy_ecs/serialize", - "bevy_input/serialize", -] +serialize = ["serde", "bevy_ecs/serialize", "bevy_input/serialize"] # Platform Compatibility @@ -56,9 +51,7 @@ bevy_input = { path = "../bevy_input", version = "0.17.0-dev", default-features bevy_math = { path = "../bevy_math", version = "0.17.0-dev", default-features = false } bevy_reflect = { path = "../bevy_reflect", version = "0.17.0-dev", default-features = false, features = [ "glam", - "smol_str", ], optional = true } -bevy_utils = { path = "../bevy_utils", version = "0.17.0-dev", default-features = false } bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-features = false } # other @@ -69,7 +62,6 @@ serde = { version = "1.0", features = [ raw-window-handle = { version = "0.6", features = [ "alloc", ], default-features = false } -smol_str = { version = "0.2", default-features = false } log = { version = "0.4", default-features = false } [target.'cfg(target_os = "android")'.dependencies] diff --git a/crates/bevy_winit/Cargo.toml b/crates/bevy_winit/Cargo.toml index 43dcc0506b..3ad2e4379e 100644 --- a/crates/bevy_winit/Cargo.toml +++ b/crates/bevy_winit/Cargo.toml @@ -16,7 +16,6 @@ x11 = ["winit/x11"] accesskit_unix = ["accesskit_winit/accesskit_unix", "accesskit_winit/async-io"] serialize = [ - "serde", "bevy_input/serialize", "bevy_window/serialize", "bevy_platform/serialize", @@ -38,7 +37,6 @@ bevy_log = { path = "../bevy_log", version = "0.17.0-dev" } bevy_math = { path = "../bevy_math", version = "0.17.0-dev" } bevy_reflect = { path = "../bevy_reflect", version = "0.17.0-dev" } bevy_window = { path = "../bevy_window", version = "0.17.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.17.0-dev" } bevy_tasks = { path = "../bevy_tasks", version = "0.17.0-dev" } bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-features = false, features = [ "std", @@ -57,7 +55,6 @@ accesskit_winit = { version = "0.27", default-features = false, features = [ approx = { version = "0.5", default-features = false } cfg-if = "1.0" raw-window-handle = "0.6" -serde = { version = "1.0", features = ["derive"], optional = true } bytemuck = { version = "1.5", optional = true } wgpu-types = { version = "25", optional = true } accesskit = "0.19"