Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a3e7745

Browse filesBrowse files
authored
N43: pecs (rust-gamedev#1301)
1 parent 15e57f3 commit a3e7745
Copy full SHA for a3e7745

File tree

2 files changed

+23
-0
lines changed
Filter options

2 files changed

+23
-0
lines changed

‎content/news/043/index.md

Copy file name to clipboardExpand all lines: content/news/043/index.md
+23Lines 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

Copy file name to clipboard
222 KB
Loading

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.