
# Objective - Contributes to #15460 ## Solution - Made `web-time` a `wasm32`-only dependency. - Moved time-related exports to its own module for clarity. - Feature-gated allocator requirements for `hashbrown` behind `alloc`. - Enabled compile-time RNG for `ahash` (runtime RNG will preferentially used in `std` environments) - Made `thread_local` optional by feature-gating the `Parallel` type. ## Testing - Ran CI locally. - `cargo build -p bevy_utils --target "x86_64-unknown-none" --no-default-features`
12 lines
419 B
Rust
12 lines
419 B
Rust
#[cfg(target_arch = "wasm32")]
|
|
pub use web_time::{Duration, Instant, SystemTime, SystemTimeError, TryFromFloatSecsError};
|
|
|
|
#[cfg(all(not(target_arch = "wasm32"), feature = "std"))]
|
|
pub use {
|
|
core::time::{Duration, TryFromFloatSecsError},
|
|
std::time::{Instant, SystemTime, SystemTimeError},
|
|
};
|
|
|
|
#[cfg(all(not(target_arch = "wasm32"), not(feature = "std")))]
|
|
pub use core::time::{Duration, TryFromFloatSecsError};
|