Skip to content

Conversation

@alexcrichton
Copy link
Member

This commit fixes an issue with the rust async support where when a yield-loop was detected it suspended with CALLBACK_CODE_YIELD which meant that it wasn't possible to deliver async events for other async operations in progress. The fix is to instead return CALLBACK_CODE_POLL with the waitable-set that has all the waitables inside of it. This enables delivery of async events from that set to ensure that if the yielding task is waiting on something else that it gets delivered.

This also refactors a few things here and there, such as CALLBACK_CODE_*, to be less error prone. Support was added for composing 3+ components with wasm-compose since wac doesn't yet use the same wasm-tools.

This commit fixes an issue with the rust async support where when a
yield-loop was detected it suspended with `CALLBACK_CODE_YIELD` which
meant that it wasn't possible to deliver async events for other async
operations in progress. The fix is to instead return
`CALLBACK_CODE_POLL` with the waitable-set that has all the waitables
inside of it. This enables delivery of async events from that set to
ensure that if the yielding task is waiting on something else that it
gets delivered.

This also refactors a few things here and there, such as
`CALLBACK_CODE_*`, to be less error prone. Support was added for
composing 3+ components with `wasm-compose` since `wac` doesn't yet
use the same `wasm-tools`.
@alexcrichton alexcrichton requested a review from dicej November 25, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant