Skip to content

Commit 8efea1b

Browse files
lewiszlwItsDoot
authored andcommitted
Rename dynamic feature (bevyengine#7340)
# Objective - Fixes bevyengine#7334 ## Solution - Rename `dynamic` feature to `dynamic_linking`. --- ## Migration Guide - `dynamic` feature was renamed to `dynamic_linking`
1 parent 69d5d7e commit 8efea1b

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ default = [
4848
]
4949

5050
# Force dynamic linking, which improves iterative compile times
51-
dynamic = ["bevy_dylib", "bevy_internal/dynamic"]
51+
dynamic_linking = ["bevy_dylib", "bevy_internal/dynamic_linking"]
5252

5353
# Optional bevy crates
5454
bevy_animation = ["bevy_internal/bevy_animation"]

crates/bevy_diagnostic/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ keywords = ["bevy"]
1010

1111
[features]
1212
# Disables diagnostics that are unsupported when Bevy is dynamically linked
13-
dynamic = []
13+
dynamic_linking = []
1414

1515
[dependencies]
1616
# bevy

crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl SystemInformationDiagnosticsPlugin {
3434
target_os = "android",
3535
target_os = "macos"
3636
),
37-
not(feature = "dynamic")
37+
not(feature = "dynamic_linking")
3838
))]
3939
pub mod internal {
4040
use bevy_ecs::{prelude::ResMut, system::Local};
@@ -142,7 +142,7 @@ pub mod internal {
142142
target_os = "android",
143143
target_os = "macos"
144144
),
145-
not(feature = "dynamic")
145+
not(feature = "dynamic_linking")
146146
)))]
147147
pub mod internal {
148148
pub(crate) fn setup_system() {

crates/bevy_dylib/src/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@
1515
//!
1616
//! ## The recommended way
1717
//!
18-
//! The easiest way to enable dynamic linking is to use the `--features bevy/dynamic` flag when
18+
//! The easiest way to enable dynamic linking is to use the `--features bevy/dynamic_linking` flag when
1919
//! using the `cargo run` command:
2020
//!
21-
//! `cargo run --features bevy/dynamic`
21+
//! `cargo run --features bevy/dynamic_linking`
2222
//!
2323
//! ## The unrecommended way
2424
//!
25-
//! It is also possible to enable the `dynamic` feature inside of the `Cargo.toml` file. This is
25+
//! It is also possible to enable the `dynamic_linking` feature inside of the `Cargo.toml` file. This is
2626
//! unrecommended because it requires you to remove this feature every time you want to create a
2727
//! release build to avoid having to ship additional files with your game.
2828
//!
29-
//! To enable dynamic linking inside of the `Cargo.toml` file add the `dynamic` feature to the
29+
//! To enable dynamic linking inside of the `Cargo.toml` file add the `dynamic_linking` feature to the
3030
//! bevy dependency:
3131
//!
32-
//! `features = ["dynamic"]`
32+
//! `features = ["dynamic_linking"]`
3333
//!
3434
//! ## The manual way
3535
//!

crates/bevy_internal/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "bevy_internal"
33
version = "0.9.0"
44
edition = "2021"
5-
description = "An internal Bevy crate used to facilitate optional dynamic linking via the 'dynamic' feature"
5+
description = "An internal Bevy crate used to facilitate optional dynamic linking via the 'dynamic_linking' feature"
66
homepage = "https://bevyengine.org"
77
repository = "https://github.com/bevyengine/bevy"
88
license = "MIT OR Apache-2.0"
@@ -72,7 +72,7 @@ bevy_ci_testing = ["bevy_app/bevy_ci_testing", "bevy_render/ci_limits"]
7272
animation = ["bevy_animation", "bevy_gltf?/bevy_animation"]
7373

7474
# Used to disable code that is unsupported when Bevy is dynamically linked
75-
dynamic = ["bevy_diagnostic/dynamic"]
75+
dynamic_linking = ["bevy_diagnostic/dynamic_linking"]
7676

7777
[dependencies]
7878
# bevy

docs/cargo_features.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
|feature name|description|
2424
|-|-|
2525
|bevy_dynamic_plugin|Plugin for dynamic loading (using [libloading](https://crates.io/crates/libloading)).|
26-
|dynamic|Forces bevy to be dynamically linked, which improves iterative compile times.|
26+
|dynamic_linking|Forces bevy to be dynamically linked, which improves iterative compile times.|
2727
|trace|Enables system tracing.|
2828
|trace_chrome|Enables [tracing-chrome](https://github.com/thoren-d/tracing-chrome) as bevy_log output. This allows you to visualize system execution.|
2929
|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.|

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@
4545

4646
pub use bevy_internal::*;
4747

48-
#[cfg(feature = "dynamic")]
48+
#[cfg(feature = "dynamic_linking")]
4949
#[allow(unused_imports)]
5050
use bevy_dylib;

0 commit comments

Comments
 (0)