bevy/tools/ci/src/commands
Zachary Harrold 72f096c91e
Add no_std support to bevy_tasks (#15464)
# Objective

- Contributes to #15460

## Solution

- Added the following features:
  - `std` (default)
  - `async_executor` (default)
  - `edge_executor`
  - `critical-section`
  - `portable-atomic`
- Added [`edge-executor`](https://crates.io/crates/edge-executor) as a
`no_std` alternative to `async-executor`.
- Updated the `single_threaded_task_pool` to work in `no_std`
environments by gating its reliance on `thread_local`.

## Testing

- Added to `compile-check-no-std` CI command

## Notes

- In previous iterations of this PR, a custom `async-executor`
alternative was vendored in. This raised concerns around maintenance and
testing. In this iteration, an existing version of that same vendoring
is now used, but _only_ in `no_std` contexts. For existing `std`
contexts, the original `async-executor` is used.
- Due to the way statics work, certain `TaskPool` operations have added
restrictions around `Send`/`Sync` in `no_std`. This is because there
isn't a straightforward way to create a thread-local in `no_std`. If
these added constraints pose an issue we can revisit this at a later
date.
- If a user enables both the `async_executor` and `edge_executor`
features, we will default to using `async-executor`. Since enabling
`async_executor` requires `std`, we can safely assume we are in an `std`
context and use the original library.

---------

Co-authored-by: Mike <2180432+hymm@users.noreply.github.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-12-06 02:14:54 +00:00
..
bench_check.rs Fix CI bench compile check (#14728) 2024-08-14 13:23:00 +00:00
clippy.rs Small changes to ci tool (#13137) 2024-04-30 00:54:14 +00:00
compile_check_no_std.rs Add no_std support to bevy_tasks (#15464) 2024-12-06 02:14:54 +00:00
compile_check.rs Small changes to ci tool (#13137) 2024-04-30 00:54:14 +00:00
compile_fail.rs Move compile fail tests (#13196) 2024-05-03 13:35:21 +00:00
compile.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00
doc_check.rs Make doc CI use nightly (#16147) 2024-11-07 00:56:22 +00:00
doc_test.rs Small changes to ci tool (#13137) 2024-04-30 00:54:14 +00:00
doc.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00
example_check.rs Small changes to ci tool (#13137) 2024-04-30 00:54:14 +00:00
format.rs Small changes to ci tool (#13137) 2024-04-30 00:54:14 +00:00
lints.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00
mod.rs Add compile-check-no-std Command to CI Tool (#15843) 2024-10-11 10:54:44 +00:00
test_check.rs Small changes to ci tool (#13137) 2024-04-30 00:54:14 +00:00
test.rs Small changes to ci tool (#13137) 2024-04-30 00:54:14 +00:00