alexcrichton opened PR #6948 from alexcrichton:tcp-echo-server to bytecodealliance:main:
- Use
command::add_to_linkerin tests to reduce the number of times all theadd_to_linkerare listed.- Add all
wasi:socketsinterfaces currently implemented to both the sync and asynccommandfunctions (this enables all the interfaces in the CLI for example).- Use
tokio::net::TcpStream::try_iowhenever I/O is performed on a socket, ensuring that readable/writable flags are set/cleared appropriately (otherwise once readable a socket is infinitely readable).- Add a
with_ambient_tokio_runtimehelper function to use when creating atokio::net::TcpStreamsince otherwise it panics due to a lack of active runtime in a synchronous context.- Add
WouldBlockhandling to return a 0-length read.- Add an
--inherit-networkCLI flag to enable basic usage of sockets in the CLI.This will conflict a small amount with #6877 but should be easy to resolve, and otherwise this targets different usability points/issues than that PR.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested fitzgen for a review on PR #6948.
alexcrichton requested wasmtime-core-reviewers for a review on PR #6948.
pchickey submitted PR review:
Thanks, this is a very minor conflict with backpressure_2 but no big deal resolving that, since this can land right now.
pchickey merged PR #6948.
Last updated: Dec 13 2025 at 19:03 UTC