mirror of
https://github.com/bevyengine/bevy
synced 2024-11-14 00:47:32 +00:00
bd489068c6
# Objective - Adjust `bevy_utils` to make it `no_std` compatible - Partially replaces #6581 - Contributes to #8161 - Contributes to #6370 ## Solution Added `alloc` and `std` features to `bevy_utils` (`std` is enabled by default), allowing the crate's use in `no_std` contexts. ## Testing - CI passed locally. - Used `bevy_utils` in a `no_std` crate as an experiment and compiled successfully. ## Migration Guide If you were importing `bevy_utils` and setting `default_features` to `false`, but relying on elements which are now gated behind the `std` or `alloc` features, include the relevant feature in your `Cargo.toml`. ## Notes - Bevy already includes a single `no_std` crate, `bevy_ptr`, so there is precedent for this change. - As `bevy_utils` is widely used across the rest of Bevy, further work to make Bevy `no_std` compatible would be blocked on this crate, if such work was to be undertaken. - Most of the changes in this PR are just the removal of an unnecessary call to `to_string()` within unit tests.
38 lines
1,003 B
TOML
38 lines
1,003 B
TOML
[package]
|
|
name = "bevy_utils"
|
|
version = "0.15.0-dev"
|
|
edition = "2021"
|
|
description = "A collection of utils for Bevy Engine"
|
|
homepage = "https://bevyengine.org"
|
|
repository = "https://github.com/bevyengine/bevy"
|
|
license = "MIT OR Apache-2.0"
|
|
keywords = ["bevy"]
|
|
|
|
[features]
|
|
default = ["std"]
|
|
std = ["alloc", "tracing/std", "ahash/std"]
|
|
alloc = []
|
|
detailed_trace = []
|
|
|
|
[dependencies]
|
|
ahash = { version = "0.8.7", default-features = false, features = [
|
|
"runtime-rng",
|
|
] }
|
|
tracing = { version = "0.1", default-features = false }
|
|
web-time = { version = "1.1" }
|
|
hashbrown = { version = "0.14.2", features = ["serde"] }
|
|
bevy_utils_proc_macros = { version = "0.15.0-dev", path = "macros" }
|
|
thread_local = "1.0"
|
|
|
|
[dev-dependencies]
|
|
static_assertions = "1.1.0"
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
getrandom = { version = "0.2.0", features = ["js"] }
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[package.metadata.docs.rs]
|
|
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
|
|
all-features = true
|