bevy/crates/bevy_reflect/src
Zachary Harrold ad016cb850
Improve bevy_reflect no_std support (#18060)
# Objective

- Fixes #18051

## Solution

- Switched function registry to use `bevy_platform_support::sync`
instead of `std::sync`
- Also documented that `debug_stack` (and transitively `debug`) require
`std`
- Also removed `std` from `wgpu-types` since that crate is now `no_std`
compatible

## Testing

- `cargo check -p bevy_reflect --no-default-features --features
critical-section,documentation,glam,glam/libm,smallvec,wgpu-types,functions
--target thumbv6m-none-eabi`

---

## Notes

With these changes, `bevy_reflect`'s feature support looks like this:

| Feature | `no_std` (Before) | `no_std` (After) | Notes |
| - | - | - | - |
| `default` |  |  | |
| `std` |  |  | |
| `documentation` | ✔️ | ✔️ | |
| `functions` |  | ✔️ | |
| `critical-section` | ✔️ | ✔️ | |
| `bevy` | ✔️* | ✔️* | Partial due to `smol_str` |
| `debug` |  |  | |
| `debug_stack` |  |  | |
| `petgraph` |  |  | |
| `glam` | ✔️* | ✔️* | Requires enabling `glam/libm` |
| `smallvec` | ✔️ | ✔️ | |
| `uuid` | ✔️* | ✔️* | Requires setting up `getrandom` backend |
| `wgpu-types ` |  | ✔️ | |
| `smol_str` | ✔️* | ✔️* | Partial due to `smol_str` not supporting
`portable-atomic` |
2025-02-27 06:16:10 +00:00
..
enums Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
func Improve bevy_reflect no_std support (#18060) 2025-02-27 06:16:10 +00:00
impls Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
path Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
serde Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
array.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
attributes.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
fields.rs Create bevy_platform_support Crate (#17250) 2025-01-20 20:45:30 +00:00
from_reflect.rs
generics.rs Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
kind.rs
lib.rs Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
list.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
map.rs Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
reflect.rs Fix a few typos (#17292) 2025-01-10 22:48:30 +00:00
reflectable.rs
remote.rs
set.rs Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
std_traits.rs
struct_trait.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
tuple_struct.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
tuple.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
type_info_stack.rs
type_info.rs
type_path.rs
type_registry.rs Add TypeRegistry::register_by_val (#17817) 2025-02-15 19:07:01 +00:00
utility.rs Move hashbrown and foldhash out of bevy_utils (#17460) 2025-01-23 16:46:08 +00:00