From 20a7da73c41a9ed41d26e16d4abac344658ab5f5 Mon Sep 17 00:00:00 2001 From: atlas dostal Date: Mon, 25 Aug 2025 11:22:54 -0400 Subject: [PATCH 1/3] Move a few transitive feature dependency specifications to bevy_internal and clean up duplicates and add missing dependencies --- Cargo.toml | 109 +++++++++++--------------------- crates/bevy_internal/Cargo.toml | 41 +++++++----- 2 files changed, 62 insertions(+), 88 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a8516f186dd73..42248f79c6ee1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -178,22 +178,13 @@ default = [ default_no_std = ["libm", "critical-section", "bevy_color", "bevy_state"] # Provides an implementation for picking meshes -bevy_mesh_picking_backend = [ - "bevy_picking", - "bevy_internal/bevy_mesh_picking_backend", -] +bevy_mesh_picking_backend = ["bevy_internal/bevy_mesh_picking_backend"] # Provides an implementation for picking sprites -bevy_sprite_picking_backend = [ - "bevy_picking", - "bevy_internal/bevy_sprite_picking_backend", -] +bevy_sprite_picking_backend = ["bevy_internal/bevy_sprite_picking_backend"] # Provides an implementation for picking UI -bevy_ui_picking_backend = [ - "bevy_picking", - "bevy_internal/bevy_ui_picking_backend", -] +bevy_ui_picking_backend = ["bevy_internal/bevy_ui_picking_backend"] # Provides a debug overlay for bevy UI bevy_ui_debug = ["bevy_internal/bevy_ui_debug"] @@ -205,7 +196,7 @@ dynamic_linking = ["dep:bevy_dylib", "bevy_internal/dynamic_linking"] sysinfo_plugin = ["bevy_internal/sysinfo_plugin"] # Provides animation functionality -bevy_animation = ["bevy_internal/bevy_animation", "bevy_color"] +bevy_animation = ["bevy_internal/bevy_animation"] # Provides asset functionality bevy_asset = ["bevy_internal/bevy_asset"] @@ -217,90 +208,70 @@ bevy_audio = ["bevy_internal/bevy_audio"] bevy_color = ["bevy_internal/bevy_color"] # Provides cameras and other basic render pipeline features -bevy_core_pipeline = [ - "bevy_internal/bevy_core_pipeline", - "bevy_asset", - "bevy_render", -] +bevy_core_pipeline = ["bevy_internal/bevy_core_pipeline"] # Provides various anti aliasing solutions -bevy_anti_aliasing = [ - "bevy_internal/bevy_anti_aliasing", - "bevy_asset", - "bevy_render", -] +bevy_anti_aliasing = ["bevy_internal/bevy_anti_aliasing"] # Adds gamepad support bevy_gilrs = ["bevy_internal/bevy_gilrs"] # [glTF](https://www.khronos.org/gltf/) support -bevy_gltf = ["bevy_internal/bevy_gltf", "bevy_asset", "bevy_scene", "bevy_pbr"] +bevy_gltf = ["bevy_internal/bevy_gltf"] # Adds PBR rendering -bevy_pbr = [ - "bevy_internal/bevy_pbr", - "bevy_asset", - "bevy_render", - "bevy_core_pipeline", - "bevy_anti_aliasing", -] +bevy_pbr = ["bevy_internal/bevy_pbr"] # Provides picking functionality bevy_picking = ["bevy_internal/bevy_picking"] # Provides rendering functionality -bevy_render = ["bevy_internal/bevy_render", "bevy_color"] +bevy_render = ["bevy_internal/bevy_render"] # Provides scene functionality -bevy_scene = ["bevy_internal/bevy_scene", "bevy_asset"] +bevy_scene = ["bevy_internal/bevy_scene"] # Provides raytraced lighting (experimental) -bevy_solari = [ - "bevy_internal/bevy_solari", - "bevy_asset", - "bevy_core_pipeline", - "bevy_pbr", - "bevy_render", -] +bevy_solari = ["bevy_internal/bevy_solari"] # Provides sprite functionality -bevy_sprite = ["bevy_internal/bevy_sprite", "bevy_color"] +bevy_sprite = ["bevy_internal/bevy_sprite"] # Provides sprite rendering functionality -bevy_sprite_render = [ - "bevy_internal/bevy_sprite_render", - "bevy_sprite", - "bevy_render", - "bevy_core_pipeline", - "bevy_color", - "bevy_anti_aliasing", -] +bevy_sprite_render = ["bevy_internal/bevy_sprite_render"] # Provides text functionality -bevy_text = ["bevy_internal/bevy_text", "bevy_asset"] +bevy_text = ["bevy_internal/bevy_text"] # A custom ECS-driven UI framework -bevy_ui = ["bevy_internal/bevy_ui", "bevy_text", "bevy_sprite", "bevy_color"] +bevy_ui = ["bevy_internal/bevy_ui"] # Provides rendering functionality for bevy_ui -bevy_ui_render = [ - "bevy_internal/bevy_ui_render", - "bevy_render", - "bevy_sprite_render", - "bevy_ui", -] +bevy_ui_render = ["bevy_internal/bevy_ui_render"] # Windowing layer bevy_window = ["bevy_internal/bevy_window"] # winit window and input backend -bevy_winit = ["bevy_internal/bevy_winit", "bevy_window"] +bevy_winit = ["bevy_internal/bevy_winit"] # Load and access image data. Usually added by an image format bevy_image = ["bevy_internal/bevy_image"] +# Provides a mesh format and some primitive meshing routines. +bevy_mesh = ["bevy_internal/bevy_mesh"] + +# Provides camera and visibility types, as well as culling primitives. +bevy_camera = ["bevy_internal/bevy_camera"] + +# Provides light types such as point lights, directional lights, spotlights. +bevy_light = ["bevy_internal/bevy_light"] + +# Provides shaders usable through asset handles. +bevy_shader = ["bevy_internal/bevy_shader"] + # Adds support for rendering gizmos -bevy_gizmos = ["bevy_internal/bevy_gizmos", "bevy_color"] +bevy_gizmos = ["bevy_internal/bevy_gizmos"] # Provides a collection of developer tools bevy_dev_tools = ["bevy_internal/bevy_dev_tools"] @@ -336,11 +307,7 @@ trace_chrome = ["trace", "bevy_internal/trace_chrome"] trace_tracy = ["trace", "bevy_internal/trace_tracy"] # Tracing support, with memory profiling, exposing a port for Tracy -trace_tracy_memory = [ - "trace", - "bevy_internal/trace_tracy", - "bevy_internal/trace_tracy_memory", -] +trace_tracy_memory = ["bevy_internal/trace_tracy_memory"] # Tracing support trace = ["bevy_internal/trace", "dep:tracing"] @@ -469,11 +436,14 @@ android_shared_stdcxx = ["bevy_internal/android_shared_stdcxx"] detailed_trace = ["bevy_internal/detailed_trace"] # Include tonemapping Look Up Tables KTX2 files. If everything is pink, you need to enable this feature or change the `Tonemapping` method for your `Camera2d` or `Camera3d`. -tonemapping_luts = ["bevy_internal/tonemapping_luts", "ktx2", "bevy_image/zstd"] +tonemapping_luts = ["bevy_internal/tonemapping_luts"] # Include SMAA Look Up Tables KTX2 Files smaa_luts = ["bevy_internal/smaa_luts"] +# Include spatio-temporal blue noise KTX2 file used by generated environment maps, Solari and atmosphere +bluenoise_texture = ["bevy_internal/bluenoise_texture"] + # NVIDIA Deep Learning Super Sampling dlss = ["bevy_internal/dlss"] @@ -596,13 +566,6 @@ hotpatching = ["bevy_internal/hotpatching"] # Enable collecting debug information about systems and components to help with diagnostics debug = ["bevy_internal/debug"] -# Include spatio-temporal blue noise KTX2 file used by generated environment maps, Solari and atmosphere -bluenoise_texture = [ - "bevy_internal/bluenoise_texture", - "ktx2", - "bevy_image/zstd", -] - [dependencies] bevy_internal = { path = "crates/bevy_internal", version = "0.17.0-dev", default-features = false } tracing = { version = "0.1", default-features = false, optional = true } @@ -619,8 +582,8 @@ flate2 = "1.0" serde = { version = "1", features = ["derive"] } serde_json = "1.0.140" bytemuck = "1" -bevy_render = { path = "crates/bevy_render", version = "0.17.0-dev", default-features = false } # The following explicit dependencies are needed for proc macros to work inside of examples as they are part of the bevy crate itself. +bevy_render = { path = "crates/bevy_render", version = "0.17.0-dev", default-features = false } bevy_ecs = { path = "crates/bevy_ecs", version = "0.17.0-dev", default-features = false } bevy_state = { path = "crates/bevy_state", version = "0.17.0-dev", default-features = false } bevy_asset = { path = "crates/bevy_asset", version = "0.17.0-dev", default-features = false } diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index 62a1307e8bd28..24074eebf0f1b 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -23,7 +23,7 @@ trace = [ ] trace_chrome = ["bevy_log/tracing-chrome"] trace_tracy = ["bevy_render?/tracing-tracy", "bevy_log/tracing-tracy"] -trace_tracy_memory = ["bevy_log/trace_tracy_memory"] +trace_tracy_memory = ["bevy_log/trace_tracy_memory", "trace", "trace_tracy"] detailed_trace = ["bevy_ecs/detailed_trace", "bevy_render?/detailed_trace"] sysinfo_plugin = ["bevy_diagnostic/sysinfo_plugin"] @@ -66,12 +66,17 @@ statically-linked-dxc = ["bevy_render/statically-linked-dxc"] raw_vulkan_init = ["bevy_render/raw_vulkan_init"] # Include tonemapping LUT KTX2 files. -tonemapping_luts = ["bevy_core_pipeline?/tonemapping_luts"] -# Include Bluenoise texture for environment map generation. -bluenoise_texture = ["bevy_pbr?/bluenoise_texture"] +tonemapping_luts = [ + "bevy_core_pipeline?/tonemapping_luts", + "ktx2", + "bevy_image/zstd", +] # Include SMAA LUT KTX2 Files -smaa_luts = ["bevy_anti_aliasing?/smaa_luts"] +smaa_luts = ["bevy_anti_aliasing?/smaa_luts", "ktx2", "bevy_image/zstd"] + +# Include Bluenoise texture for environment map generation. +bluenoise_texture = ["bevy_pbr?/bluenoise_texture", "ktx2", "bevy_image/zstd"] # NVIDIA Deep Learning Super Sampling dlss = ["bevy_anti_aliasing/dlss", "bevy_solari?/dlss"] @@ -197,49 +202,55 @@ webgpu = [ bevy_ci_testing = ["bevy_dev_tools/bevy_ci_testing", "bevy_render?/ci_limits"] # Enable animation support, and glTF animation loading -animation = ["bevy_animation", "bevy_mesh", "bevy_gltf?/bevy_animation"] +animation = [ + "bevy_animation", + "bevy_mesh", + "bevy_color", + "bevy_gltf?/bevy_animation", +] bevy_shader = ["dep:bevy_shader"] -bevy_image = ["dep:bevy_image"] -bevy_sprite = ["dep:bevy_sprite", "bevy_image"] +bevy_image = ["dep:bevy_image", "bevy_color", "bevy_asset"] +bevy_sprite = ["dep:bevy_sprite", "bevy_camera", "bevy_gizmos?/bevy_sprite"] bevy_text = [ "dep:bevy_text", "bevy_image", "bevy_sprite?/bevy_text", "bevy_sprite_render?/bevy_text", ] +bevy_ui = ["dep:bevy_ui", "bevy_text", "bevy_sprite"] bevy_mesh = ["dep:bevy_mesh", "bevy_image"] bevy_window = ["dep:bevy_window", "dep:bevy_a11y", "bevy_image"] +bevy_winit = ["dep:bevy_winit", "bevy_window"] bevy_camera = ["dep:bevy_camera", "bevy_mesh", "bevy_window"] +bevy_scene = ["dep:bevy_scene", "bevy_asset"] bevy_light = ["dep:bevy_light", "bevy_camera"] bevy_render = [ "dep:bevy_render", - "bevy_gizmos?/bevy_render", "bevy_camera", "bevy_shader", "bevy_color/wgpu-types", "bevy_color/encase", + "bevy_gizmos?/bevy_render", ] bevy_core_pipeline = ["dep:bevy_core_pipeline", "bevy_render"] bevy_anti_aliasing = ["dep:bevy_anti_aliasing", "bevy_core_pipeline"] bevy_pbr = [ "dep:bevy_pbr", - "bevy_gizmos?/bevy_pbr", "bevy_light", "bevy_core_pipeline", + "bevy_gizmos?/bevy_pbr", ] bevy_sprite_render = [ "dep:bevy_sprite_render", "bevy_sprite", - "bevy_window", "bevy_core_pipeline", - "bevy_gizmos?/bevy_sprite", "bevy_gizmos?/bevy_sprite_render", ] -bevy_ui = ["dep:bevy_ui", "bevy_camera"] -bevy_ui_render = ["dep:bevy_ui_render"] +bevy_ui_render = ["dep:bevy_ui_render", "bevy_sprite_render", "bevy_ui"] +bevy_solari = ["dep:bevy_solari", "bevy_pbr"] bevy_gizmos = ["dep:bevy_gizmos", "bevy_camera"] -bevy_gltf = ["dep:bevy_gltf", "bevy_pbr"] +bevy_gltf = ["dep:bevy_gltf", "bevy_scene", "bevy_pbr"] # Used to disable code that is unsupported when Bevy is dynamically linked dynamic_linking = ["bevy_diagnostic/dynamic_linking"] From bac57d866ed8b47b8fccb597476655deda97699b Mon Sep 17 00:00:00 2001 From: atlas dostal Date: Mon, 25 Aug 2025 11:30:34 -0400 Subject: [PATCH 2/3] ci --- docs/cargo_features.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/cargo_features.md b/docs/cargo_features.md index 0451cbf0985c0..ad393dfd635bb 100644 --- a/docs/cargo_features.md +++ b/docs/cargo_features.md @@ -46,7 +46,6 @@ The default feature set enables most of the expected features of a game engine, |debug|Enable collecting debug information about systems and components to help with diagnostics| |default_font|Include a default font, containing only ASCII characters, at the cost of a 20kB binary size increase| |hdr|HDR image format support| -|ktx2|KTX2 compressed texture support| |multi_threaded|Enables multithreaded parallelism in the engine. Disabling it forces all engine tasks to run on a single thread.| |png|PNG image format support| |reflect_auto_register|Enable automatic reflect registration| @@ -69,11 +68,15 @@ The default feature set enables most of the expected features of a game engine, |asset_processor|Enables the built-in asset processor for processed assets.| |async-io|Use async-io's implementation of block_on instead of futures-lite's implementation. This is preferred if your application uses async-io.| |basis-universal|Basis Universal compressed texture support| +|bevy_camera|Provides camera and visibility types, as well as culling primitives.| |bevy_ci_testing|Enable systems that allow for automated testing on CI| |bevy_debug_stepping|Enable stepping-based debugging of Bevy systems| |bevy_dev_tools|Provides a collection of developer tools| |bevy_image|Load and access image data. Usually added by an image format| +|bevy_light|Provides light types such as point lights, directional lights, spotlights.| +|bevy_mesh|Provides a mesh format and some primitive meshing routines.| |bevy_remote|Enable the Bevy Remote Protocol| +|bevy_shader|Provides shaders usable through asset handles.| |bevy_solari|Provides raytraced lighting (experimental)| |bevy_ui_debug|Provides a debug overlay for bevy UI| |bluenoise_texture|Include spatio-temporal blue noise KTX2 file used by generated environment maps, Solari and atmosphere| @@ -100,6 +103,7 @@ The default feature set enables most of the expected features of a game engine, |hotpatching|Enable hotpatching of Bevy systems| |ico|ICO image format support| |jpeg|JPEG image format support| +|ktx2|KTX2 compressed texture support| |libm|Uses the `libm` maths library instead of the one provided in `std` and `core`.| |meshlet|Enables the meshlet renderer for dense high-poly scenes (experimental)| |meshlet_processor|Enables processing meshes into meshlet meshes for bevy_pbr| From 91c4063af173e22f568e417a02e362234d8c2184 Mon Sep 17 00:00:00 2001 From: atlas dostal Date: Mon, 25 Aug 2025 17:16:20 -0400 Subject: [PATCH 3/3] force default features --- Cargo.toml | 6 ++++++ docs/cargo_features.md | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 42248f79c6ee1..42fa2a821e1e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -147,6 +147,11 @@ default = [ "bevy_picking", "bevy_render", "bevy_scene", + "bevy_image", + "bevy_mesh", + "bevy_camera", + "bevy_light", + "bevy_shader", "bevy_sprite", "bevy_sprite_picking_backend", "bevy_sprite_render", @@ -160,6 +165,7 @@ default = [ "custom_cursor", "default_font", "hdr", + "ktx2", "multi_threaded", "png", "reflect_auto_register", diff --git a/docs/cargo_features.md b/docs/cargo_features.md index ad393dfd635bb..6d65725a17a00 100644 --- a/docs/cargo_features.md +++ b/docs/cargo_features.md @@ -19,19 +19,24 @@ The default feature set enables most of the expected features of a game engine, |bevy_anti_aliasing|Provides various anti aliasing solutions| |bevy_asset|Provides asset functionality| |bevy_audio|Provides audio functionality| +|bevy_camera|Provides camera and visibility types, as well as culling primitives.| |bevy_color|Provides shared color types and operations| |bevy_core_pipeline|Provides cameras and other basic render pipeline features| |bevy_core_widgets|Headless widget collection for Bevy UI.| |bevy_gilrs|Adds gamepad support| |bevy_gizmos|Adds support for rendering gizmos| |bevy_gltf|[glTF](https://www.khronos.org/gltf/) support| +|bevy_image|Load and access image data. Usually added by an image format| |bevy_input_focus|Enable input focus subsystem| +|bevy_light|Provides light types such as point lights, directional lights, spotlights.| |bevy_log|Enable integration with `tracing` and `log`| +|bevy_mesh|Provides a mesh format and some primitive meshing routines.| |bevy_mesh_picking_backend|Provides an implementation for picking meshes| |bevy_pbr|Adds PBR rendering| |bevy_picking|Provides picking functionality| |bevy_render|Provides rendering functionality| |bevy_scene|Provides scene functionality| +|bevy_shader|Provides shaders usable through asset handles.| |bevy_sprite|Provides sprite functionality| |bevy_sprite_picking_backend|Provides an implementation for picking sprites| |bevy_sprite_render|Provides sprite rendering functionality| @@ -46,6 +51,7 @@ The default feature set enables most of the expected features of a game engine, |debug|Enable collecting debug information about systems and components to help with diagnostics| |default_font|Include a default font, containing only ASCII characters, at the cost of a 20kB binary size increase| |hdr|HDR image format support| +|ktx2|KTX2 compressed texture support| |multi_threaded|Enables multithreaded parallelism in the engine. Disabling it forces all engine tasks to run on a single thread.| |png|PNG image format support| |reflect_auto_register|Enable automatic reflect registration| @@ -68,15 +74,10 @@ The default feature set enables most of the expected features of a game engine, |asset_processor|Enables the built-in asset processor for processed assets.| |async-io|Use async-io's implementation of block_on instead of futures-lite's implementation. This is preferred if your application uses async-io.| |basis-universal|Basis Universal compressed texture support| -|bevy_camera|Provides camera and visibility types, as well as culling primitives.| |bevy_ci_testing|Enable systems that allow for automated testing on CI| |bevy_debug_stepping|Enable stepping-based debugging of Bevy systems| |bevy_dev_tools|Provides a collection of developer tools| -|bevy_image|Load and access image data. Usually added by an image format| -|bevy_light|Provides light types such as point lights, directional lights, spotlights.| -|bevy_mesh|Provides a mesh format and some primitive meshing routines.| |bevy_remote|Enable the Bevy Remote Protocol| -|bevy_shader|Provides shaders usable through asset handles.| |bevy_solari|Provides raytraced lighting (experimental)| |bevy_ui_debug|Provides a debug overlay for bevy UI| |bluenoise_texture|Include spatio-temporal blue noise KTX2 file used by generated environment maps, Solari and atmosphere| @@ -103,7 +104,6 @@ The default feature set enables most of the expected features of a game engine, |hotpatching|Enable hotpatching of Bevy systems| |ico|ICO image format support| |jpeg|JPEG image format support| -|ktx2|KTX2 compressed texture support| |libm|Uses the `libm` maths library instead of the one provided in `std` and `core`.| |meshlet|Enables the meshlet renderer for dense high-poly scenes (experimental)| |meshlet_processor|Enables processing meshes into meshlet meshes for bevy_pbr|