alexcrichton opened issue #12090:
Currently there's no API to, given a
FutureReader, perform a read and then cancel that read to get back the originalFutureReader.
alexcrichton added the wasm-proposal:component-model-async label to Issue #12090.
alexcrichton commented on issue #12090:
I'm realizing this is also applicable to streams. Another case that's not currently possible with streams is to read some items and then pass the stream back into wasm. Once a host starts reading a stream it can't stop at this time.
alexcrichton commented on issue #12090:
To articulate this a bit more now that I've got more experience: here's a set of relate things you can't do with the current API:
- Start reading a
{Future,Stream}Readerthen cancel it to get back a{Future,Stream}Readerto pass back into wasm.- Start reading a
FutureReaderand somehow return "closed" to the caller. The current API ofFutureConsumeris such that "closed" is just not an option.
Last updated: Dec 06 2025 at 06:05 UTC