Skip to content

Commit a3e7745

Browse files
authored
N43: pecs (rust-gamedev#1301)
1 parent 15e57f3 commit a3e7745

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

content/news/043/index.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,29 @@ blink-alloc, only on `allocator-api2`.
427427
[Miri]: https://github.com/rust-lang/miri
428428
[strict-provenance]: https://github.com/rust-lang/rust/issues/95228
429429

430+
### [pecs]
431+
432+
![pecs example, same as in the README](pecs.png)
433+
_Promise chaining example_
434+
435+
In the ECS environment, you can't use the standard async/await
436+
approach, which can make implementing asynchronous logic painful.
437+
438+
[pecs] is a plugin for the [Bevy][bevy] engine that solves this problem.
439+
It allows you to execute the code asynchronously by chaining multiple
440+
promises as part of [Bevy's `ecs`][ecs] environment.
441+
442+
Each promise takes state and the result of the previous promise as arguments,
443+
as well as any Bevy ECS system parameter, and passes the modified
444+
state and new promise/result to the next promise. It's easy to register custom
445+
promises that wait for user input, events, asset loading, and so on. You can
446+
also use [pecs] to wait for any or all of multiple promises to complete
447+
before continuing with the rest of the code, as well as to loop asynchronously
448+
until a condition is met.
449+
450+
[pecs]: https://github.com/jkb0o/pecs
451+
[ecs]: https://bevyengine.org/learn/book/getting-started/ecs
452+
430453
## Popular Workgroup Issues in Github
431454

432455
<!-- Up to 10 links to interesting issues -->

content/news/043/pecs.png

222 KB
Loading

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy