#![cfg_attr(docsrs, feature(doc_auto_cfg))]1#![doc(2html_logo_url = "https://bevy.org/assets/icon.png",3html_favicon_url = "https://bevy.org/assets/icon.png"4)]56//! Forces dynamic linking of Bevy.7//!8//! Dynamic linking causes Bevy to be built and linked as a dynamic library. This will make9//! incremental builds compile much faster.10//!11//! # Warning12//!13//! Do not enable this feature for release builds because this would require you to ship14//! `libstd.so` and `libbevy_dylib.so` with your game.15//!16//! # Enabling dynamic linking17//!18//! ## The recommended way19//!20//! The easiest way to enable dynamic linking is to use the `--features bevy/dynamic_linking` flag when21//! using the `cargo run` command:22//!23//! `cargo run --features bevy/dynamic_linking`24//!25//! ## The unrecommended way26//!27//! It is also possible to enable the `dynamic_linking` feature inside of the `Cargo.toml` file. This is28//! unrecommended because it requires you to remove this feature every time you want to create a29//! release build to avoid having to ship additional files with your game.30//!31//! To enable dynamic linking inside of the `Cargo.toml` file add the `dynamic_linking` feature to the32//! bevy dependency:33//!34//! `features = ["dynamic_linking"]`35//!36//! ## The manual way37//!38//! Manually enabling dynamic linking is achieved by adding `bevy_dylib` as a dependency and39//! adding the following code to the `main.rs` file:40//!41//! ```42//! #[allow(unused_imports)]43//! use bevy_dylib;44//! ```45//!46//! It is recommended to disable the `bevy_dylib` dependency in release mode by adding the47//! following code to the `use` statement to avoid having to ship additional files with your game:48//!49//! ```50//! #[allow(unused_imports)]51//! #[cfg(debug_assertions)] // new52//! use bevy_dylib;53//! ```5455// Force linking of the main bevy crate56#[expect(57unused_imports,58clippy::single_component_path_imports,59reason = "This links the main bevy crate when using dynamic linking, and as such cannot be removed or changed without affecting dynamic linking."60)]61use bevy_internal;626364