dicej opened issue #11222:
Currently, the implementation of
{Future,Stream}Anyand the conversion functions from those types to/fromHost{Future,Stream}have a couple of major paper cuts:
- They're prone to leakage, e.g. dropping a
StreamAnywithout closing it or passing it to the guest will leave the read end open, meaning any further writes will hang forever.- Conversion to
Host{Stream,Future}does no typechecking, and a type error will only be raised later when a read is matched with a write (and in some cases, even then there won't be a type error if the payload types arememcpy-able, e.g.u8vs.s8).
dicej added the wasm-proposal:component-model-async label to Issue #11222.
dicej closed issue #11222:
Currently, the implementation of
{Future,Stream}Anyand the conversion functions from those types to/fromHost{Future,Stream}have a couple of major paper cuts:
- They're prone to leakage, e.g. dropping a
StreamAnywithout closing it or passing it to the guest will leave the read end open, meaning any further writes will hang forever.- Conversion to
Host{Stream,Future}does no typechecking, and a type error will only be raised later when a read is matched with a write (and in some cases, even then there won't be a type error if the payload types arememcpy-able, e.g.u8vs.s8).
dicej commented on issue #11222:
@alexcrichton This seems to be a duplicate of #11161. I'm going to close this one in favor of that one; feel free to reopen if they're both needed.
dicej reopened issue #11222:
Currently, the implementation of
{Future,Stream}Anyand the conversion functions from those types to/fromHost{Future,Stream}have a couple of major paper cuts:
- They're prone to leakage, e.g. dropping a
StreamAnywithout closing it or passing it to the guest will leave the read end open, meaning any further writes will hang forever.- Conversion to
Host{Stream,Future}does no typechecking, and a type error will only be raised later when a read is matched with a write (and in some cases, even then there won't be a type error if the payload types arememcpy-able, e.g.u8vs.s8).
dicej closed issue #11222:
Currently, the implementation of
{Future,Stream}Anyand the conversion functions from those types to/fromHost{Future,Stream}have a couple of major paper cuts:
- They're prone to leakage, e.g. dropping a
StreamAnywithout closing it or passing it to the guest will leave the read end open, meaning any further writes will hang forever.- Conversion to
Host{Stream,Future}does no typechecking, and a type error will only be raised later when a read is matched with a write (and in some cases, even then there won't be a type error if the payload types arememcpy-able, e.g.u8vs.s8).
Last updated: Dec 06 2025 at 06:05 UTC