Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions crates/bevy_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,26 @@ license = "MIT OR Apache-2.0"
keywords = ["bevy"]

[features]
default = ["std", "serde"]
default = ["std", "serde", "tracing"]
std = [
"alloc",
"tracing/std",
"log/std",
"ahash/std",
"dep:thread_local",
"ahash/runtime-rng",
"tracing?/std",
]
alloc = ["hashbrown/default"]
tracing = ["dep:tracing"]
detailed_trace = []
serde = ["hashbrown/serde"]

[dependencies]
ahash = { version = "0.8.7", default-features = false, features = [
"compile-time-rng",
] }
tracing = { version = "0.1", default-features = false }
log = { version = "0.4", default-features = false }
tracing = { version = "0.1", default-features = false, optional = true }
hashbrown = { version = "0.14.2", default-features = false }
bevy_utils_proc_macros = { version = "0.15.0-dev", path = "macros" }
thread_local = { version = "1.0", optional = true }
Expand Down
8 changes: 8 additions & 0 deletions crates/bevy_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,16 @@ pub use hashbrown;
#[cfg(feature = "std")]
pub use parallel_queue::*;
pub use time::*;

#[cfg(feature = "tracing")]
pub use tracing;

#[cfg(not(feature = "tracing"))]
// In cases where the tracing crate cannot be used, we can instead rely on log to
// provide most of the required functionality.
// Exporting log as tracing allows this decision to have minimal impact on consumers.
pub use log as tracing;

#[cfg(feature = "alloc")]
use alloc::boxed::Box;

Expand Down
Loading