bevy/crates
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
..
bevy_a11y Remove accesskit re-export from bevy_a11y (#16257) 2024-11-08 21:01:16 +00:00
bevy_animation Add Immutable Component Support (#16372) 2024-12-05 14:27:48 +00:00
bevy_app Move all_tuples to a new crate (#16161) 2024-12-03 17:41:09 +00:00
bevy_asset Support creating asset directories (#16220) 2024-11-04 22:06:00 +00:00
bevy_audio Update rodio requirement from 0.19 to 0.20 (#16359) 2024-12-03 17:55:42 +00:00
bevy_color Add no_std support to bevy_color (#16633) 2024-12-05 21:21:45 +00:00
bevy_core Support on_thread_spawn and on_thread_destroy for TaskPoolPlugin (#13045) 2024-11-11 20:00:01 +00:00
bevy_core_pipeline Add Immutable Component Support (#16372) 2024-12-05 14:27:48 +00:00
bevy_derive move ANDROID_APP to bevy_window (#15585) 2024-10-02 03:01:06 +00:00
bevy_dev_tools Retained Gizmos (#15473) 2024-12-04 21:21:06 +00:00
bevy_diagnostic Revert "Update sysinfo version to 0.32.1 (#16517)" (#16523) 2024-11-26 22:44:23 +00:00
bevy_dylib Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_ecs Run observers before hooks for on_replace and on_remove (#16499) 2024-12-06 00:24:27 +00:00
bevy_encase_derive Update `glam to 0.29, encase` to 0.10. (#15249) 2024-09-23 19:44:02 +00:00
bevy_gilrs Use Name component for gamepad (#16233) 2024-11-05 00:30:48 +00:00
bevy_gizmos Retained Gizmos (#15473) 2024-12-04 21:21:06 +00:00
bevy_gltf Make bevy_gltf compile without bevy_animation feature (#16551) 2024-11-30 00:04:30 +00:00
bevy_hierarchy Window picking (#16103) 2024-12-05 21:14:39 +00:00
bevy_image switch bevy_image to use wgpu-types wherever possible instead of wgpu (#16620) 2024-12-03 11:46:10 +00:00
bevy_input Move required components doc to type doc (#16575) 2024-12-03 19:45:20 +00:00
bevy_input_focus bevy_input_focus improvements (follow-up PR) (#16665) 2024-12-06 01:16:52 +00:00
bevy_internal bevy_input_focus improvements (follow-up PR) (#16665) 2024-12-06 01:16:52 +00:00
bevy_log Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
bevy_macro_utils Modify derive_label to support no_std environments (#15465) 2024-09-27 20:23:26 +00:00
bevy_math Use IntoIterator instead of Into<Vec<..>> in cubic splines interfaces (#16402) 2024-12-03 19:35:14 +00:00
bevy_mesh switch bevy_mesh to use wgpu-types instead of wgpu (#16619) 2024-12-03 19:49:49 +00:00
bevy_mikktspace Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
bevy_pbr Fix the texture_binding_array, specialized_mesh_pipeline, and custom_shader_instancing examples after the bindless change. (#16641) 2024-12-05 21:22:14 +00:00
bevy_picking picking: disable raycast backface culling for Mesh2d (#16657) 2024-12-05 21:22:29 +00:00
bevy_ptr Fix MSRVs for standalone crates (#16333) 2024-11-17 09:38:13 +00:00
bevy_reflect Add no_std support to bevy_reflect (#16256) 2024-12-05 21:15:21 +00:00
bevy_remote BrpQueryRow has field deserialization fix (#16613) 2024-12-04 18:26:33 +00:00
bevy_render Fix the texture_binding_array, specialized_mesh_pipeline, and custom_shader_instancing examples after the bindless change. (#16641) 2024-12-05 21:22:14 +00:00
bevy_scene Move required components doc to type doc (#16575) 2024-12-03 19:45:20 +00:00
bevy_sprite Move required components doc to type doc (#16575) 2024-12-03 19:45:20 +00:00
bevy_state Make StateTransitionSteps public (#16612) 2024-12-03 19:48:00 +00:00
bevy_tasks Add no_std support to bevy_tasks (#15464) 2024-12-06 02:14:54 +00:00
bevy_text Add Immutable Component Support (#16372) 2024-12-05 14:27:48 +00:00
bevy_time Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
bevy_transform Turn apply_deferred into a ZST System (#16642) 2024-12-05 18:14:05 +00:00
bevy_ui Turn apply_deferred into a ZST System (#16642) 2024-12-05 18:14:05 +00:00
bevy_utils Move all_tuples to a new crate (#16161) 2024-12-03 17:41:09 +00:00
bevy_window Support prefers_home_indicator_hidden (#16005) 2024-10-31 16:09:30 +00:00
bevy_winit bevy_winit(emit raw winit events) (#15884) 2024-12-03 17:20:43 +00:00