diff --git a/Cargo.toml b/Cargo.toml index 721cf4c518358..daa5b45533b2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,7 @@ default = [ ] # Force dynamic linking, which improves iterative compile times -dynamic = ["bevy_dylib", "bevy_internal/dynamic"] +dynamic_linking = ["bevy_dylib", "bevy_internal/dynamic_linking"] # Optional bevy crates bevy_animation = ["bevy_internal/bevy_animation"] diff --git a/crates/bevy_diagnostic/Cargo.toml b/crates/bevy_diagnostic/Cargo.toml index 31a35fcecae95..4788528c7a38d 100644 --- a/crates/bevy_diagnostic/Cargo.toml +++ b/crates/bevy_diagnostic/Cargo.toml @@ -10,7 +10,7 @@ keywords = ["bevy"] [features] # Disables diagnostics that are unsupported when Bevy is dynamically linked -dynamic = [] +dynamic_linking = [] [dependencies] # bevy diff --git a/crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs b/crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs index 0dd103f8efd18..b2d104dd7c9ce 100644 --- a/crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs +++ b/crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs @@ -34,7 +34,7 @@ impl SystemInformationDiagnosticsPlugin { target_os = "android", target_os = "macos" ), - not(feature = "dynamic") + not(feature = "dynamic_linking") ))] pub mod internal { use bevy_ecs::{prelude::ResMut, system::Local}; @@ -142,7 +142,7 @@ pub mod internal { target_os = "android", target_os = "macos" ), - not(feature = "dynamic") + not(feature = "dynamic_linking") )))] pub mod internal { pub(crate) fn setup_system() { diff --git a/crates/bevy_dylib/src/lib.rs b/crates/bevy_dylib/src/lib.rs index c8a860d62baa1..a950f985d611a 100644 --- a/crates/bevy_dylib/src/lib.rs +++ b/crates/bevy_dylib/src/lib.rs @@ -15,21 +15,21 @@ //! //! ## The recommended way //! -//! The easiest way to enable dynamic linking is to use the `--features bevy/dynamic` flag when +//! The easiest way to enable dynamic linking is to use the `--features bevy/dynamic_linking` flag when //! using the `cargo run` command: //! -//! `cargo run --features bevy/dynamic` +//! `cargo run --features bevy/dynamic_linking` //! //! ## The unrecommended way //! -//! It is also possible to enable the `dynamic` feature inside of the `Cargo.toml` file. This is +//! It is also possible to enable the `dynamic_linking` feature inside of the `Cargo.toml` file. This is //! unrecommended because it requires you to remove this feature every time you want to create a //! release build to avoid having to ship additional files with your game. //! -//! To enable dynamic linking inside of the `Cargo.toml` file add the `dynamic` feature to the +//! To enable dynamic linking inside of the `Cargo.toml` file add the `dynamic_linking` feature to the //! bevy dependency: //! -//! `features = ["dynamic"]` +//! `features = ["dynamic_linking"]` //! //! ## The manual way //! diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index a9bedc8658ac3..da264c92a8dfc 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -2,7 +2,7 @@ name = "bevy_internal" version = "0.9.0" edition = "2021" -description = "An internal Bevy crate used to facilitate optional dynamic linking via the 'dynamic' feature" +description = "An internal Bevy crate used to facilitate optional dynamic linking via the 'dynamic_linking' feature" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" license = "MIT OR Apache-2.0" @@ -72,7 +72,7 @@ bevy_ci_testing = ["bevy_app/bevy_ci_testing", "bevy_render/ci_limits"] animation = ["bevy_animation", "bevy_gltf?/bevy_animation"] # Used to disable code that is unsupported when Bevy is dynamically linked -dynamic = ["bevy_diagnostic/dynamic"] +dynamic_linking = ["bevy_diagnostic/dynamic_linking"] [dependencies] # bevy diff --git a/docs/cargo_features.md b/docs/cargo_features.md index 8934ad65ba63b..54432097fbc2a 100644 --- a/docs/cargo_features.md +++ b/docs/cargo_features.md @@ -23,7 +23,7 @@ |feature name|description| |-|-| |bevy_dynamic_plugin|Plugin for dynamic loading (using [libloading](https://crates.io/crates/libloading)).| -|dynamic|Forces bevy to be dynamically linked, which improves iterative compile times.| +|dynamic_linking|Forces bevy to be dynamically linked, which improves iterative compile times.| |trace|Enables system tracing.| |trace_chrome|Enables [tracing-chrome](https://github.com/thoren-d/tracing-chrome) as bevy_log output. This allows you to visualize system execution.| |trace_tracy|Enables [Tracy](https://github.com/wolfpld/tracy) as bevy_log output. This allows `Tracy` to connect to and capture profiling data as well as visualize system execution in real-time, present statistics about system execution times, and more.| diff --git a/src/lib.rs b/src/lib.rs index 7e52880dfcfea..22b57943a9466 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -45,6 +45,6 @@ pub use bevy_internal::*; -#[cfg(feature = "dynamic")] +#[cfg(feature = "dynamic_linking")] #[allow(unused_imports)] use bevy_dylib;