bevy/crates/bevy_internal/src/prelude.rs
Zachary Harrold c5365509bf Allow partial support for bevy_log in no_std (#18782)
- Fixes #18781

- Moved `LogPlugin` into its own file gated behind a new `tracing`
feature.
- Used `log` instead of `tracing` where possible.
- Exposed a new `tracing` feature in `bevy` which enables
`bevy_log/tracing`.
- Gated `LogPlugin` from `DefaultPlugins` on `tracing` feature.

- CI

---

- If you were previously using `bevy_log` with default features
disabled, enable the new `std` and `tracing` features.
- If you were using `bevy` with the default features disabled, enable
the new `tracing` feature.

Almost all of the diffs in this PR come from moving `LogPlugin` into its
own file. This just makes the PR less noisy, since the alternative is
excessive `#[cfg(feature = "tracing")]` directives all over the plugin.

---------

Co-authored-by: François Mockers <francois.mockers@vleue.com>
2025-04-11 09:03:12 +02:00

81 lines
1.8 KiB
Rust

#[doc(hidden)]
pub use crate::{
app::prelude::*, ecs::prelude::*, input::prelude::*, log::prelude::*, math::prelude::*,
platform_support::prelude::*, reflect::prelude::*, time::prelude::*, transform::prelude::*,
utils::prelude::*, DefaultPlugins, MinimalPlugins,
};
#[doc(hidden)]
#[cfg(feature = "bevy_window")]
pub use crate::window::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_image")]
pub use crate::image::prelude::*;
pub use bevy_derive::{bevy_main, Deref, DerefMut};
#[doc(hidden)]
#[cfg(feature = "bevy_asset")]
pub use crate::asset::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_audio")]
pub use crate::audio::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_animation")]
pub use crate::animation::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_color")]
pub use crate::color::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_core_pipeline")]
pub use crate::core_pipeline::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_pbr")]
pub use crate::pbr::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_render")]
pub use crate::render::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_scene")]
pub use crate::scene::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_sprite")]
pub use crate::sprite::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_text")]
pub use crate::text::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_ui")]
pub use crate::ui::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_gizmos")]
pub use crate::gizmos::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_gilrs")]
pub use crate::gilrs::*;
#[doc(hidden)]
#[cfg(feature = "bevy_state")]
pub use crate::state::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_gltf")]
pub use crate::gltf::prelude::*;
#[doc(hidden)]
#[cfg(feature = "bevy_picking")]
pub use crate::picking::prelude::*;