Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Conversation

@dicej
Copy link
Collaborator

@dicej dicej commented Jun 13, 2025

As of WebAssembly/component-model#524, we now trap if a guest tries to use a stream or future handle (besides dropping it) after it is "done" (see that PR for what "done" means). This required more careful tracking of the state of each end of the stream or future.

In the process of debugging this into shape, I added some trace logging and addressed a couple of issues I noticed:

  • wasi-http's Response::into_http wasn't noticing a non-empty buffer at the end of a stream
  • the p3_http_middleware test was not clearing its buffer before each read

As of WebAssembly/component-model#524, we now trap if a
guest tries to use a stream or future handle (besides dropping it) after it is
"done" (see that PR for what "done" means).  This required more careful tracking
of the state of each end of the stream or future.

In the process of debugging this into shape, I added some trace logging and
addressed a couple of issues I noticed:

- `wasi-http`'s `Response::into_http` wasn't noticing a non-empty buffer at the end of a stream
- the `p3_http_middleware` test was not clearing its buffer before each read

Signed-off-by: Joel Dice <[email protected]>
@dicej dicej added this pull request to the merge queue Jun 13, 2025
Merged via the queue into main with commit 93576ab Jun 13, 2025
44 checks passed
@dicej dicej deleted the dicej/trappy-streams-and-futures branch June 13, 2025 19:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant