Skip to content

Commit a3e7745

Browse files
authored
N43: pecs (#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)