![]() Updates the requirements on [derive_more](https://github.com/JelteF/derive_more) to permit the latest version. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/JelteF/derive_more/releases">derive_more's releases</a>.</em></p> <blockquote> <h2>2.0.1</h2> <p><a href="https://docs.rs/derive_more/2.0.1">API docs</a> <a href="https://github.com/JelteF/derive_more/blob/v2.0.1/CHANGELOG.md#201---2025-02-03">Changelog</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/JelteF/derive_more/blob/master/CHANGELOG.md">derive_more's changelog</a>.</em></p> <blockquote> <h2>2.0.1 - 2025-02-03</h2> <h3>Added</h3> <ul> <li>Add crate metadata for the Rust Playground. This makes sure that the Rust Playground will have all <code>derive_more</code> features available once <a href="https://docs.rs/selectors/latest/selectors"><code>selectors</code></a> crate updates its <code>derive_more</code> version. (<a href="https://redirect.github.com/JelteF/derive_more/pull/445">#445</a>)</li> </ul> <h2>2.0.0 - 2025-02-03</h2> <h3>Breaking changes</h3> <ul> <li><code>use derive_more::SomeTrait</code> now imports macro only. Importing macro with its trait along is possible now via <code>use derive_more::with_trait::SomeTrait</code>. (<a href="https://redirect.github.com/JelteF/derive_more/pull/406">#406</a>)</li> <li>Top-level <code>#[display("...")]</code> attribute on an enum now has defaulting behavior instead of replacing when no wrapping is possible (no <code>_variant</code> placeholder). (<a href="https://redirect.github.com/JelteF/derive_more/pull/395">#395</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>Associated types of type parameters not being treated as generics in <code>Debug</code> and <code>Display</code> expansions. (<a href="https://redirect.github.com/JelteF/derive_more/pull/399">#399</a>)</li> <li><code>unreachable_code</code> warnings on generated code when <code>!</code> (never type) is used. (<a href="https://redirect.github.com/JelteF/derive_more/pull/404">#404</a>)</li> <li>Ambiguous associated item error when deriving <code>TryFrom</code>, <code>TryInto</code> or <code>FromStr</code> with an associated item called <code>Error</code> or <code>Err</code> respectively. (<a href="https://redirect.github.com/JelteF/derive_more/pull/410">#410</a>)</li> <li>Top-level <code>#[display("...")]</code> attribute on an enum being incorrectly treated as transparent or wrapping. (<a href="https://redirect.github.com/JelteF/derive_more/pull/395">#395</a>)</li> <li>Omitted raw identifiers in <code>Debug</code> and <code>Display</code> expansions. (<a href="https://redirect.github.com/JelteF/derive_more/pull/431">#431</a>)</li> <li>Incorrect rendering of raw identifiers as field names in <code>Debug</code> expansions. (<a href="https://redirect.github.com/JelteF/derive_more/pull/431">#431</a>)</li> <li>Top-level <code>#[display("...")]</code> attribute on an enum not working transparently for directly specified fields. (<a href="https://redirect.github.com/JelteF/derive_more/pull/438">#438</a>)</li> <li>Incorrect dereferencing of unsized fields in <code>Debug</code> and <code>Display</code> expansions. (<a href="https://redirect.github.com/JelteF/derive_more/pull/440">#440</a>)</li> </ul> <h2>0.99.19 - 2025-02-03</h2> <ul> <li>Add crate metadata for the Rust Playground.</li> </ul> <h2>1.0.0 - 2024-08-07</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
---|---|---|
.. | ||
examples | ||
src | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md |
Bevy Tasks
A refreshingly simple task executor for bevy. :)
This is a simple threadpool with minimal dependencies. The main usecase is a scoped fork-join, i.e. spawning tasks from
a single thread and having that thread await the completion of those tasks. This is intended specifically for
bevy
as a lighter alternative to rayon
for this specific usecase. There are also utilities for
generating the tasks from a slice of data. This library is intended for games and makes no attempt to ensure fairness
or ordering of spawned tasks.
It is based on async-executor
, a lightweight executor that allows the end user to manage their own threads.
async-executor
is based on async-task, a core piece of async-std.
Usage
In order to be able to optimize task execution in multi-threaded environments, bevy provides three different thread pools via which tasks of different kinds can be spawned. (The same API is used in single-threaded environments, even if execution is limited to a single thread. This currently applies to Wasm targets.) The determining factor for what kind of work should go in each pool is latency requirements:
-
For CPU-intensive work (tasks that generally spin until completion) we have a standard [
ComputeTaskPool
] and an [AsyncComputeTaskPool
]. Work that does not need to be completed to present the next frame should go to the [AsyncComputeTaskPool
]. -
For IO-intensive work (tasks that spend very little time in a "woken" state) we have an [
IoTaskPool
] whose tasks are expected to complete very quickly. Generally speaking, they should just await receiving data from somewhere (i.e. disk) and signal other systems when the data is ready for consumption. (likely via channels)
no_std
Support
To enable no_std
support in this crate, you will need to disable default features, and enable the edge_executor
and critical-section
features.