Skip to content

Conversation

@dicej
Copy link
Collaborator

@dicej dicej commented Dec 18, 2025

We now keep track of any resource/stream/future handles we've lowered while writing to a stream or future and restore any that were unwritten so they can be used (e.g. possibly written) again.

While I was working on this, clippy pointed out that std::io::pipe (which I started using in a previous commit) was added in Rust 1.87, so I've bumped the MSRV to match.

Also, the test case I added to cover this revealed another bug, which I've fixed here: we weren't generating valid code for async functions which return tuples.

Fixes #1458

We now keep track of any resource/stream/future handles we've lowered while
writing to a stream or future and restore any that were unwritten so they can be
used (e.g. possibly written) again.

While I was working on this, clippy pointed out that `std::io::pipe` (which I
started using in a previous commit) was added in Rust 1.87, so I've bumped the
MSRV to match.

Also, the test case I added to cover this revealed another bug, which I've fixed
here: we weren't generating valid code for async functions which return tuples.

Fixes bytecodealliance#1458

Signed-off-by: Joel Dice <[email protected]>
@dicej dicej requested a review from alexcrichton December 18, 2025 00:02
@alexcrichton alexcrichton added this pull request to the merge queue Dec 19, 2025
Merged via the queue into bytecodealliance:main with commit 964dc8e Dec 19, 2025
25 checks passed
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.

go: restore resource/stream/future handles on incomplete writes

2 participants