From 860856d07524280096786352c551db156bb36ab2 Mon Sep 17 00:00:00 2001 From: Mateusz Wachowiak Date: Sun, 14 Jan 2024 16:41:33 +0100 Subject: [PATCH 01/11] Add bevy_dev_tools crate --- Cargo.toml | 4 ++++ crates/bevy_dev_tools/Cargo.toml | 15 +++++++++++++++ crates/bevy_dev_tools/src/lib.rs | 12 ++++++++++++ crates/bevy_internal/Cargo.toml | 4 ++++ crates/bevy_internal/src/default_plugins.rs | 6 ++++++ crates/bevy_internal/src/lib.rs | 6 ++++++ docs/cargo_features.md | 1 + tools/publish.sh | 1 + 8 files changed, 49 insertions(+) create mode 100644 crates/bevy_dev_tools/Cargo.toml create mode 100644 crates/bevy_dev_tools/src/lib.rs diff --git a/Cargo.toml b/Cargo.toml index 446d4a13d1c62..118da8750d526 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,6 +67,7 @@ default = [ "bevy_sprite", "bevy_text", "bevy_ui", + "bevy_dev_tools", "multi-threaded", "png", "hdr", @@ -155,6 +156,9 @@ bevy_winit = ["bevy_internal/bevy_winit"] # Adds support for rendering gizmos bevy_gizmos = ["bevy_internal/bevy_gizmos", "bevy_color"] +# Provides a collection of developer tools +bevy_dev_tools = ["bevy_internal/bevy_dev_tools"] + # Tracing support, saving a file in Chrome Tracing format trace_chrome = ["trace", "bevy_internal/trace_chrome"] diff --git a/crates/bevy_dev_tools/Cargo.toml b/crates/bevy_dev_tools/Cargo.toml new file mode 100644 index 0000000000000..31f3f625ad024 --- /dev/null +++ b/crates/bevy_dev_tools/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "bevy_dev_tools" +version = "0.14.0-dev" +edition = "2021" +description = "Collection of developer tools for the Bevy Engine" +homepage = "https://bevyengine.org" +repository = "https://github.com/bevyengine/bevy" +license = "MIT OR Apache-2.0" +keywords = ["bevy"] + +[dependencies] +bevy_app = { path = "../bevy_app", version = "0.14.0-dev" } + +[lints] +workspace = true diff --git a/crates/bevy_dev_tools/src/lib.rs b/crates/bevy_dev_tools/src/lib.rs new file mode 100644 index 0000000000000..01b23613c10e5 --- /dev/null +++ b/crates/bevy_dev_tools/src/lib.rs @@ -0,0 +1,12 @@ +#![warn(missing_docs)] +//! This crate provides additional utilities for the [Bevy game engine](https://bevyengine.org), +//! aimed at improving developer experience. + +use bevy_app::prelude::*; + +/// Adds developer tools to an App. +pub struct DevToolsPlugin; + +impl Plugin for DevToolsPlugin { + fn build(&self, _app: &mut App) {} +} diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index 9396eca5d4e20..5e6c4cedd00c8 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -163,6 +163,9 @@ bevy_debug_stepping = [ "bevy_app/bevy_debug_stepping", ] +# Provides a collection of developer tools +bevy_dev_tools = ["dep:bevy_dev_tools"] + [dependencies] # bevy bevy_a11y = { path = "../bevy_a11y", version = "0.14.0-dev" } @@ -201,6 +204,7 @@ bevy_ui = { path = "../bevy_ui", optional = true, version = "0.14.0-dev" } bevy_winit = { path = "../bevy_winit", optional = true, version = "0.14.0-dev" } bevy_gilrs = { path = "../bevy_gilrs", optional = true, version = "0.14.0-dev" } bevy_gizmos = { path = "../bevy_gizmos", optional = true, version = "0.14.0-dev", default-features = false } +bevy_dev_tools = { path = "../bevy_dev_tools/", optional = true, version = "0.14.0-dev" } [lints] workspace = true diff --git a/crates/bevy_internal/src/default_plugins.rs b/crates/bevy_internal/src/default_plugins.rs index c0869a24909f2..08d68b0fdcff1 100644 --- a/crates/bevy_internal/src/default_plugins.rs +++ b/crates/bevy_internal/src/default_plugins.rs @@ -27,6 +27,7 @@ use bevy_app::{Plugin, PluginGroup, PluginGroupBuilder}; /// * [`AudioPlugin`](crate::audio::AudioPlugin) - with feature `bevy_audio` /// * [`GilrsPlugin`](crate::gilrs::GilrsPlugin) - with feature `bevy_gilrs` /// * [`AnimationPlugin`](crate::animation::AnimationPlugin) - with feature `bevy_animation` +/// * [`DevToolsPlugin`](crate::dev_tools::DevToolsPlugin) - with feature `bevy_dev_tools` /// /// [`DefaultPlugins`] obeys *Cargo* *feature* flags. Users may exert control over this plugin group /// by disabling `default-features` in their `Cargo.toml` and enabling only those features @@ -134,6 +135,11 @@ impl PluginGroup for DefaultPlugins { group = group.add(bevy_gizmos::GizmoPlugin); } + #[cfg(feature = "bevy_dev_tools")] + { + group = group.add(bevy_dev_tools::DevToolsPlugin); + } + group = group.add(IgnoreAmbiguitiesPlugin); group diff --git a/crates/bevy_internal/src/lib.rs b/crates/bevy_internal/src/lib.rs index 25a2584c7d83c..896091c404c98 100644 --- a/crates/bevy_internal/src/lib.rs +++ b/crates/bevy_internal/src/lib.rs @@ -199,3 +199,9 @@ pub mod dynamic_plugin { //! Dynamic linking of plugins pub use bevy_dynamic_plugin::*; } + +#[cfg(feature = "bevy_dev_tools")] +pub mod dev_tools { + //! Collection of developer tools + pub use bevy_dev_tools::*; +} diff --git a/docs/cargo_features.md b/docs/cargo_features.md index fa3f20d0ad191..4c1a226228d61 100644 --- a/docs/cargo_features.md +++ b/docs/cargo_features.md @@ -19,6 +19,7 @@ The default feature set enables most of the expected features of a game engine, |bevy_color|Provides shared color types and operations| |bevy_core_pipeline|Provides cameras and other basic render pipeline features| |bevy_debug_stepping|Enable stepping-based debugging of Bevy systems| +|bevy_dev_tools|Provides a collection of developer tools| |bevy_gilrs|Adds gamepad support| |bevy_gizmos|Adds support for rendering gizmos| |bevy_gltf|[glTF](https://www.khronos.org/gltf/) support| diff --git a/tools/publish.sh b/tools/publish.sh index 3bb2f9b09cf24..d9b63ddde835b 100644 --- a/tools/publish.sh +++ b/tools/publish.sh @@ -41,6 +41,7 @@ crates=( bevy_a11y bevy_ui bevy_winit + bevy_dev_tools bevy_internal bevy_dylib bevy_color From dbb4b920d80d74dbbb24d5525a6cf90f528282e3 Mon Sep 17 00:00:00 2001 From: Mateusz Wachowiak Date: Mon, 15 Jan 2024 22:24:04 +0100 Subject: [PATCH 02/11] move ci_testing to bevy_dev_tools --- crates/bevy_app/Cargo.toml | 1 - crates/bevy_app/src/app.rs | 5 ----- crates/bevy_app/src/lib.rs | 3 --- crates/bevy_dev_tools/Cargo.toml | 12 +++++++++++- .../{bevy_app => bevy_dev_tools}/src/ci_testing.rs | 2 +- crates/bevy_dev_tools/src/lib.rs | 9 ++++++++- crates/bevy_internal/Cargo.toml | 2 +- crates/bevy_render/Cargo.toml | 3 ++- crates/bevy_render/src/view/window/screenshot.rs | 4 ++-- crates/bevy_time/Cargo.toml | 3 ++- crates/bevy_time/src/lib.rs | 2 +- 11 files changed, 28 insertions(+), 18 deletions(-) rename crates/{bevy_app => bevy_dev_tools}/src/ci_testing.rs (98%) diff --git a/crates/bevy_app/Cargo.toml b/crates/bevy_app/Cargo.toml index 020245b6449dc..e42d986f1a669 100644 --- a/crates/bevy_app/Cargo.toml +++ b/crates/bevy_app/Cargo.toml @@ -10,7 +10,6 @@ keywords = ["bevy"] [features] trace = [] -bevy_ci_testing = ["serde", "ron"] bevy_debug_stepping = [] default = ["bevy_reflect", "bevy_debug_stepping"] bevy_reflect = ["dep:bevy_reflect", "bevy_ecs/bevy_reflect"] diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs index f08a3e73bd788..f339b5d8002f5 100644 --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -188,11 +188,6 @@ impl Default for App { app.add_event::(); - #[cfg(feature = "bevy_ci_testing")] - { - crate::ci_testing::setup_app(&mut app); - } - app } } diff --git a/crates/bevy_app/src/lib.rs b/crates/bevy_app/src/lib.rs index 8f6ba7972f272..721cf1618a724 100644 --- a/crates/bevy_app/src/lib.rs +++ b/crates/bevy_app/src/lib.rs @@ -6,9 +6,6 @@ mod plugin; mod plugin_group; mod schedule_runner; -#[cfg(feature = "bevy_ci_testing")] -pub mod ci_testing; - pub use app::*; pub use bevy_derive::DynamicPlugin; pub use main_schedule::*; diff --git a/crates/bevy_dev_tools/Cargo.toml b/crates/bevy_dev_tools/Cargo.toml index 31f3f625ad024..8dde0636f4455 100644 --- a/crates/bevy_dev_tools/Cargo.toml +++ b/crates/bevy_dev_tools/Cargo.toml @@ -8,8 +8,18 @@ repository = "https://github.com/bevyengine/bevy" license = "MIT OR Apache-2.0" keywords = ["bevy"] +[features] +bevy_ci_testing = ["serde", "ron"] + [dependencies] +# bevy bevy_app = { path = "../bevy_app", version = "0.14.0-dev" } +bevy_utils = { path = "../bevy_utils", version = "0.14.0-dev" } +bevy_ecs = { path = "../bevy_ecs", version = "0.14.0-dev" } + +# other +serde = { version = "1.0", features = ["derive"], optional = true } +ron = { version = "0.8.0", optional = true } [lints] -workspace = true +workspace = true \ No newline at end of file diff --git a/crates/bevy_app/src/ci_testing.rs b/crates/bevy_dev_tools/src/ci_testing.rs similarity index 98% rename from crates/bevy_app/src/ci_testing.rs rename to crates/bevy_dev_tools/src/ci_testing.rs index 3ba0dde78e307..db2d4a14fc70e 100644 --- a/crates/bevy_app/src/ci_testing.rs +++ b/crates/bevy_dev_tools/src/ci_testing.rs @@ -1,6 +1,6 @@ //! Utilities for testing in CI environments. -use crate::{app::AppExit, App, Update}; +use bevy_app::{App, AppExit, Update}; use serde::Deserialize; use bevy_ecs::prelude::Resource; diff --git a/crates/bevy_dev_tools/src/lib.rs b/crates/bevy_dev_tools/src/lib.rs index 01b23613c10e5..d4a5b3c58d882 100644 --- a/crates/bevy_dev_tools/src/lib.rs +++ b/crates/bevy_dev_tools/src/lib.rs @@ -3,10 +3,17 @@ //! aimed at improving developer experience. use bevy_app::prelude::*; +#[cfg(feature = "bevy_ci_testing")] +pub mod ci_testing; /// Adds developer tools to an App. pub struct DevToolsPlugin; impl Plugin for DevToolsPlugin { - fn build(&self, _app: &mut App) {} + fn build(&self, _app: &mut App) { + #[cfg(feature = "bevy_ci_testing")] + { + ci_testing::setup_app(_app); + } + } } diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index 5e6c4cedd00c8..665b456905891 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -114,7 +114,7 @@ webgpu = [ # enable systems that allow for automated testing on CI bevy_ci_testing = [ - "bevy_app/bevy_ci_testing", + "bevy_dev_tools/bevy_ci_testing", "bevy_time/bevy_ci_testing", "bevy_render?/bevy_ci_testing", "bevy_render?/ci_limits", diff --git a/crates/bevy_render/Cargo.toml b/crates/bevy_render/Cargo.toml index 84b58b00032a3..7e9012d99df3e 100644 --- a/crates/bevy_render/Cargo.toml +++ b/crates/bevy_render/Cargo.toml @@ -19,7 +19,7 @@ webp = ["image/webp"] dds = ["ddsfile"] pnm = ["image/pnm"] multi-threaded = ["bevy_tasks/multi-threaded"] -bevy_ci_testing = ["bevy_app/bevy_ci_testing"] +bevy_ci_testing = ["bevy_dev_tools/bevy_ci_testing"] shader_format_glsl = ["naga/glsl-in", "naga/wgsl-out", "naga_oil/glsl"] shader_format_spirv = ["wgpu/spirv", "naga/spv-in", "naga/spv-out"] @@ -57,6 +57,7 @@ bevy_transform = { path = "../bevy_transform", version = "0.14.0-dev" } bevy_window = { path = "../bevy_window", version = "0.14.0-dev" } bevy_utils = { path = "../bevy_utils", version = "0.14.0-dev" } bevy_tasks = { path = "../bevy_tasks", version = "0.14.0-dev" } +bevy_dev_tools = { path = "../bevy_dev_tools", version = "0.14.0-dev", optional = true } # rendering image = { version = "0.24", default-features = false } diff --git a/crates/bevy_render/src/view/window/screenshot.rs b/crates/bevy_render/src/view/window/screenshot.rs index ca93f73afd81f..b51c4f479770a 100644 --- a/crates/bevy_render/src/view/window/screenshot.rs +++ b/crates/bevy_render/src/view/window/screenshot.rs @@ -144,7 +144,7 @@ impl Plugin for ScreenshotPlugin { #[cfg(feature = "bevy_ci_testing")] if app .world - .contains_resource::() + .contains_resource::() { app.add_systems(bevy_app::Update, ci_testing_screenshot_at); } @@ -154,7 +154,7 @@ impl Plugin for ScreenshotPlugin { #[cfg(feature = "bevy_ci_testing")] fn ci_testing_screenshot_at( mut current_frame: Local, - ci_testing_config: Res, + ci_testing_config: Res, mut screenshot_manager: ResMut, main_window: Query>, ) { diff --git a/crates/bevy_time/Cargo.toml b/crates/bevy_time/Cargo.toml index beb9d0db56108..5b586ebab3d03 100644 --- a/crates/bevy_time/Cargo.toml +++ b/crates/bevy_time/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["bevy"] [features] default = [] serialize = ["serde"] -bevy_ci_testing = ["bevy_app/bevy_ci_testing"] +bevy_ci_testing = ["bevy_dev_tools/bevy_ci_testing"] [dependencies] # bevy @@ -23,6 +23,7 @@ bevy_reflect = { path = "../bevy_reflect", version = "0.14.0-dev", features = [ "bevy", ] } bevy_utils = { path = "../bevy_utils", version = "0.14.0-dev" } +bevy_dev_tools = { path = "../bevy_dev_tools", version = "0.14.0-dev", optional = true } # other crossbeam-channel = "0.5.0" diff --git a/crates/bevy_time/src/lib.rs b/crates/bevy_time/src/lib.rs index e5c0a407971b2..c94e6f46db0ba 100644 --- a/crates/bevy_time/src/lib.rs +++ b/crates/bevy_time/src/lib.rs @@ -68,7 +68,7 @@ impl Plugin for TimePlugin { #[cfg(feature = "bevy_ci_testing")] if let Some(ci_testing_config) = app .world - .get_resource::() + .get_resource::() { if let Some(frame_time) = ci_testing_config.frame_time { app.world From 294a078f8c9a874df3a342b59e327d1df8c93704 Mon Sep 17 00:00:00 2001 From: Mateusz Wachowiak Date: Tue, 16 Jan 2024 21:12:41 +0100 Subject: [PATCH 03/11] rephrase docs --- crates/bevy_dev_tools/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_dev_tools/src/lib.rs b/crates/bevy_dev_tools/src/lib.rs index d4a5b3c58d882..e424f2a1101e6 100644 --- a/crates/bevy_dev_tools/src/lib.rs +++ b/crates/bevy_dev_tools/src/lib.rs @@ -1,12 +1,12 @@ #![warn(missing_docs)] //! This crate provides additional utilities for the [Bevy game engine](https://bevyengine.org), -//! aimed at improving developer experience. +//! focused on improving developer experience. use bevy_app::prelude::*; #[cfg(feature = "bevy_ci_testing")] pub mod ci_testing; -/// Adds developer tools to an App. +/// Enables developer tools in an [`App`]. pub struct DevToolsPlugin; impl Plugin for DevToolsPlugin { From 9d32bd9ad778446e3f0c5684834896d2ce41a8d4 Mon Sep 17 00:00:00 2001 From: Mateusz Wachowiak Date: Tue, 16 Jan 2024 21:30:00 +0100 Subject: [PATCH 04/11] add example how to turn off DevToolsPlugin --- crates/bevy_dev_tools/src/lib.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/crates/bevy_dev_tools/src/lib.rs b/crates/bevy_dev_tools/src/lib.rs index e424f2a1101e6..7fcfd7379d72b 100644 --- a/crates/bevy_dev_tools/src/lib.rs +++ b/crates/bevy_dev_tools/src/lib.rs @@ -7,6 +7,23 @@ use bevy_app::prelude::*; pub mod ci_testing; /// Enables developer tools in an [`App`]. +/// This plugin is part of the [`DefaultPlugins`](https://docs.rs/bevy/latest/bevy/struct.DefaultPlugins.html), and enabled by default. +/// +/// It's recommended to disable it in a release. To disable it, you can either: +/// +/// - Remove it when adding [`DefaultPlugins`](https://docs.rs/bevy/latest/bevy/struct.DefaultPlugins.html): +/// ```no_run +/// # use bevy_app::{App, NoopPluginGroup as DefaultPlugins, PluginGroup}; +/// # use bevy_dev_tools::{DevToolsPlugin}; +/// fn main() { +/// App::new() +/// .add_plugins(DefaultPlugins.build().disable::()) +/// .run(); +/// } +/// ``` +/// +/// - Disable the feature: +/// Disable default features from Bevy, and don't enable the feature `bevy_dev_tools`. pub struct DevToolsPlugin; impl Plugin for DevToolsPlugin { From a02e2ac0a1f7b1d73ddfed9b39306c8724abb11f Mon Sep 17 00:00:00 2001 From: Mateusz Wachowiak Date: Sat, 20 Jan 2024 14:55:08 +0100 Subject: [PATCH 05/11] remove bevy_dev_tools from default features --- Cargo.toml | 1 - crates/bevy_dev_tools/src/lib.rs | 29 ++++++++++++++--------------- docs/cargo_features.md | 2 +- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 118da8750d526..e395b6ffd9748 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,7 +67,6 @@ default = [ "bevy_sprite", "bevy_text", "bevy_ui", - "bevy_dev_tools", "multi-threaded", "png", "hdr", diff --git a/crates/bevy_dev_tools/src/lib.rs b/crates/bevy_dev_tools/src/lib.rs index 7fcfd7379d72b..8f8f79301a4cd 100644 --- a/crates/bevy_dev_tools/src/lib.rs +++ b/crates/bevy_dev_tools/src/lib.rs @@ -6,24 +6,23 @@ use bevy_app::prelude::*; #[cfg(feature = "bevy_ci_testing")] pub mod ci_testing; -/// Enables developer tools in an [`App`]. -/// This plugin is part of the [`DefaultPlugins`](https://docs.rs/bevy/latest/bevy/struct.DefaultPlugins.html), and enabled by default. +/// Enables developer tools in an [`App`]. This plugin is added automatically with `bevy_dev_tools` +/// feature. /// -/// It's recommended to disable it in a release. To disable it, you can either: +/// Warning: It is not recommended to enable this in a release build. /// -/// - Remove it when adding [`DefaultPlugins`](https://docs.rs/bevy/latest/bevy/struct.DefaultPlugins.html): -/// ```no_run -/// # use bevy_app::{App, NoopPluginGroup as DefaultPlugins, PluginGroup}; -/// # use bevy_dev_tools::{DevToolsPlugin}; -/// fn main() { -/// App::new() -/// .add_plugins(DefaultPlugins.build().disable::()) -/// .run(); -/// } -/// ``` +/// To enable developer tools, you can either: /// -/// - Disable the feature: -/// Disable default features from Bevy, and don't enable the feature `bevy_dev_tools`. +/// - Use `--feature bevy/bevy_dev_tools` flag when using the `cargo run` command: +/// +/// `cargo run --features bevy/bevy_dev_tools` +/// +/// - Add the `bevy_dev_tools` feature to the bevy dependency in your `Cargo.toml` file: +/// +/// `features = ["bevy_dev_tools"]` +/// +/// Note: The second method is not recommended, as it requires you to remove the feature before +/// creating a release build. pub struct DevToolsPlugin; impl Plugin for DevToolsPlugin { diff --git a/docs/cargo_features.md b/docs/cargo_features.md index 4c1a226228d61..df2e811e8a227 100644 --- a/docs/cargo_features.md +++ b/docs/cargo_features.md @@ -19,7 +19,6 @@ The default feature set enables most of the expected features of a game engine, |bevy_color|Provides shared color types and operations| |bevy_core_pipeline|Provides cameras and other basic render pipeline features| |bevy_debug_stepping|Enable stepping-based debugging of Bevy systems| -|bevy_dev_tools|Provides a collection of developer tools| |bevy_gilrs|Adds gamepad support| |bevy_gizmos|Adds support for rendering gizmos| |bevy_gltf|[glTF](https://www.khronos.org/gltf/) support| @@ -51,6 +50,7 @@ The default feature set enables most of the expected features of a game engine, |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_ci_testing|Enable systems that allow for automated testing on CI| +|bevy_dev_tools|Provides a collection of developer tools| |bevy_dynamic_plugin|Plugin for dynamic loading (using [libloading](https://crates.io/crates/libloading))| |bmp|BMP image format support| |dds|DDS compressed texture support| From 33337286199a6dd0a33be12cc34e4eec9ec70ba2 Mon Sep 17 00:00:00 2001 From: Mateusz Wachowiak Date: Sat, 20 Jan 2024 18:32:25 +0100 Subject: [PATCH 06/11] rephrase doc --- crates/bevy_dev_tools/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_dev_tools/src/lib.rs b/crates/bevy_dev_tools/src/lib.rs index 8f8f79301a4cd..272b7c07424bf 100644 --- a/crates/bevy_dev_tools/src/lib.rs +++ b/crates/bevy_dev_tools/src/lib.rs @@ -22,7 +22,7 @@ pub mod ci_testing; /// `features = ["bevy_dev_tools"]` /// /// Note: The second method is not recommended, as it requires you to remove the feature before -/// creating a release build. +/// creating a build for release to the public. pub struct DevToolsPlugin; impl Plugin for DevToolsPlugin { From 1f9bdc7fb0eabf0f7c4b5a806d71fb83e8d9428f Mon Sep 17 00:00:00 2001 From: Mateusz Wachowiak Date: Sat, 20 Jan 2024 18:32:59 +0100 Subject: [PATCH 07/11] Update crates/bevy_dev_tools/src/lib.rs Co-authored-by: Alice Cecile --- crates/bevy_dev_tools/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/bevy_dev_tools/src/lib.rs b/crates/bevy_dev_tools/src/lib.rs index 272b7c07424bf..da7d571d98522 100644 --- a/crates/bevy_dev_tools/src/lib.rs +++ b/crates/bevy_dev_tools/src/lib.rs @@ -9,7 +9,9 @@ pub mod ci_testing; /// Enables developer tools in an [`App`]. This plugin is added automatically with `bevy_dev_tools` /// feature. /// -/// Warning: It is not recommended to enable this in a release build. +/// Warning: It is not recommended to enable this in final shipped games or applications. +/// Dev tools provide a high level of access to the internals of your application, +/// and may interfere with ordinary use and gameplay. /// /// To enable developer tools, you can either: /// From 8932b96eeb90f58426532a41e1aaf81bc4a2d3ef Mon Sep 17 00:00:00 2001 From: Mateusz Wachowiak Date: Sat, 20 Jan 2024 18:45:16 +0100 Subject: [PATCH 08/11] add docs about another way to enable bevy_dev_tools --- crates/bevy_dev_tools/src/lib.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/bevy_dev_tools/src/lib.rs b/crates/bevy_dev_tools/src/lib.rs index da7d571d98522..ef32ded162050 100644 --- a/crates/bevy_dev_tools/src/lib.rs +++ b/crates/bevy_dev_tools/src/lib.rs @@ -15,6 +15,14 @@ pub mod ci_testing; /// /// To enable developer tools, you can either: /// +/// - Create a custom crate feature (e.g "dev_mode"), which enables the `bevy_dev_tools` feature +/// along with any other development tools you might be using: +/// +/// ```toml +/// [feature] +/// dev_mode = ["bevy/bevy_dev_tools", "other_dev_tools"] +/// ``` +/// /// - Use `--feature bevy/bevy_dev_tools` flag when using the `cargo run` command: /// /// `cargo run --features bevy/bevy_dev_tools` @@ -23,7 +31,7 @@ pub mod ci_testing; /// /// `features = ["bevy_dev_tools"]` /// -/// Note: The second method is not recommended, as it requires you to remove the feature before +/// Note: The third method is not recommended, as it requires you to remove the feature before /// creating a build for release to the public. pub struct DevToolsPlugin; From dd6d998bb8ce2aa4872ee85d3ec3ee382ed3ad3c Mon Sep 17 00:00:00 2001 From: Mateusz Wachowiak Date: Sat, 20 Jan 2024 18:53:43 +0100 Subject: [PATCH 09/11] fix ci --- crates/bevy_dev_tools/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_dev_tools/src/lib.rs b/crates/bevy_dev_tools/src/lib.rs index ef32ded162050..107b77241ef0d 100644 --- a/crates/bevy_dev_tools/src/lib.rs +++ b/crates/bevy_dev_tools/src/lib.rs @@ -15,7 +15,7 @@ pub mod ci_testing; /// /// To enable developer tools, you can either: /// -/// - Create a custom crate feature (e.g "dev_mode"), which enables the `bevy_dev_tools` feature +/// - Create a custom crate feature (e.g "`dev_mode`"), which enables the `bevy_dev_tools` feature /// along with any other development tools you might be using: /// /// ```toml From 73757ec936baa4c118f0bf0177522ba30de68e58 Mon Sep 17 00:00:00 2001 From: Mateusz Wachowiak Date: Wed, 6 Mar 2024 19:21:50 +0100 Subject: [PATCH 10/11] Update crates/bevy_dev_tools/src/lib.rs Co-authored-by: BD103 <59022059+BD103@users.noreply.github.com> --- crates/bevy_dev_tools/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/bevy_dev_tools/src/lib.rs b/crates/bevy_dev_tools/src/lib.rs index 107b77241ef0d..b025539ebbb57 100644 --- a/crates/bevy_dev_tools/src/lib.rs +++ b/crates/bevy_dev_tools/src/lib.rs @@ -1,4 +1,3 @@ -#![warn(missing_docs)] //! This crate provides additional utilities for the [Bevy game engine](https://bevyengine.org), //! focused on improving developer experience. From b4f2202544ce07e5a1e8e5a5aec6981b76ef91eb Mon Sep 17 00:00:00 2001 From: Mateusz Wachowiak Date: Wed, 6 Mar 2024 19:38:28 +0100 Subject: [PATCH 11/11] run taplo --- crates/bevy_dev_tools/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_dev_tools/Cargo.toml b/crates/bevy_dev_tools/Cargo.toml index 8dde0636f4455..eb6597d8bd7ff 100644 --- a/crates/bevy_dev_tools/Cargo.toml +++ b/crates/bevy_dev_tools/Cargo.toml @@ -22,4 +22,4 @@ serde = { version = "1.0", features = ["derive"], optional = true } ron = { version = "0.8.0", optional = true } [lints] -workspace = true \ No newline at end of file +workspace = true