Skip to content

Commit fdd9ffa

Browse files
Allow bevy_reflect and wgpu-types features in no_std for bevy_color (#18061)
# Objective - Improve feature parity in `no_std` for `bevy_color` ## Solution - Allowed `bevy_reflect` in `no_std` now that it has full support - Allowed `wgpu-types` in `no_std` now version 24 has full support - Added `critical-section` feature to make standalone usage in `no_std` easier ## Testing - `cargo check -p bevy_color --no-default-features --features libm,bevy_reflect,critical-section,serialize,alloc,wgpu-types --target thumbv6m-none-eabi` --- ## Notes With these changes, `bevy_color`'s feature support looks like this: | Feature | `no_std` (Before) | `no_std` (After) | Notes | | - | - | - | - | | `default` | ❌ | ❌ | | | `std` | ❌ | ❌ | | | `alloc` | ✔️ | ✔️ | | | `serialize` | ✔️ | ✔️ | | | `bevy_reflect` | ❌ | ✔️ | | | `wgpu-types` | ❌ | ✔️ | | | `encase` | ❌ | ❌ | | | `libm` | ✔️ | ✔️ | | | `critical-section` | ➖ | ✔️ | |
1 parent ad1691e commit fdd9ffa

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

crates/bevy_color/Cargo.toml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ rust-version = "1.85.0"
1313
bevy_math = { path = "../bevy_math", version = "0.16.0-dev", default-features = false, features = [
1414
"curve",
1515
] }
16-
bevy_reflect = { path = "../bevy_reflect", version = "0.16.0-dev", features = [
17-
"bevy",
18-
], optional = true }
16+
bevy_reflect = { path = "../bevy_reflect", version = "0.16.0-dev", default-features = false, optional = true }
1917
bytemuck = { version = "1", features = ["derive"] }
2018
serde = { version = "1.0", features = [
2119
"derive",
@@ -27,13 +25,20 @@ encase = { version = "0.10", default-features = false, optional = true }
2725

2826
[features]
2927
default = ["std", "bevy_reflect", "encase"]
30-
std = ["alloc", "bevy_math/std", "serde?/std"]
28+
std = [
29+
"alloc",
30+
"bevy_math/std",
31+
"serde?/std",
32+
"wgpu-types?/std",
33+
"bevy_reflect?/std",
34+
]
3135
alloc = ["bevy_math/alloc", "serde?/alloc"]
3236
serialize = ["serde", "bevy_math/serialize"]
33-
bevy_reflect = ["dep:bevy_reflect", "std"]
34-
wgpu-types = ["dep:wgpu-types", "std"]
37+
bevy_reflect = ["dep:bevy_reflect"]
38+
wgpu-types = ["dep:wgpu-types"]
3539
encase = ["dep:encase", "std"]
3640
libm = ["bevy_math/libm"]
41+
critical-section = ["bevy_reflect?/critical-section"]
3742

3843
[lints]
3944
workspace = true

0 commit comments

Comments
 (0)