bevy/tools
Zachary Harrold f45e78e658
Add no_std support to bevy_app (#16874)
# Objective

- Contributes to #15460

## Solution

- Added the following features:
  - `std` (default)
  - `bevy_tasks` (default)
  - `downcast ` (default)
  - `portable-atomic`
  - `critical-section`
- `downcast` and `bevy_tasks` are now optional dependencies for
`bevy_app`.

## Testing

- CI
- Personal UEFI and Raspberry Pi Pico demo applications compile and run
against this branch

## Draft Release Notes

Bevy's application framework now supports `no_std` platforms.

Following up on `bevy_ecs` gaining `no_std` support, `bevy_app` extends
the functionality available on these targets to include the powerful
`App` and `Plugin` abstractions. With this, library authors now have the
option of making their plugins `no_std` compatible, or even offering
plugins specifically to improve Bevy on certain embedded platforms!

To start making a `no_std` compatible plugin, simply disable default
features when including `bevy_app`:

```toml
[dependencies]
bevy_app = { version = "0.16", default-features = false }
```

We encourage library authors to do this anyway, as it can also help with
compile times and binary size on all platforms.

Keep an eye out for future `no_std` updates as we continue to improve
the parity between `std` and `no_std`. We look forward to seeing what
kinds of applications are now possible with Bevy!

## Notes

- `downcast-rs` is optional as it isn't compatible with
`portable-atomic`. I will investigate making a PR upstream to add
support for this functionality, as it should be very straightforward.
- In line with the `bevy_ecs` no-std-ification, I've added documentation
to all features, and grouped them as well.
- ~~Creating this PR in draft while CI runs and so I can polish before
review.~~

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-12-18 22:04:45 +00:00
..
build-templated-pages Update hashbrown to 0.15 (#15801) 2024-12-10 19:45:50 +00:00
build-wasm-example Fix common capitalization errors in documentation (#14562) 2024-07-31 21:16:05 +00:00
ci Add no_std support to bevy_app (#16874) 2024-12-18 22:04:45 +00:00
compile_fail_utils Fix compile_fail compile fail (#16805) 2024-12-17 00:01:08 +00:00
example-showcase Add ability to mute audio sinks (#16813) 2024-12-15 19:19:16 +00:00
publish.sh Add "bevy_input_focus" crate. (#15611) 2024-12-05 18:08:31 +00:00