Stream: git-wasmtime

Topic: wasmtime / PR #11386 Use the same `TcpSocket` in WASIp{2,3}


view this post on Zulip Wasmtime GitHub notifications bot (Aug 06 2025 at 14:37):

alexcrichton opened PR #11386 from alexcrichton:wasi-sockets-tcp-refactor to bytecodealliance:main:

This is the same as #11384 except for TcpSocket to share the implementation of TCP across WASIp{2,3} and avoid duplicating code between the two.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Aug 06 2025 at 14:37):

alexcrichton requested wasmtime-wasi-reviewers for a review on PR #11386.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 06 2025 at 14:51):

alexcrichton requested dicej for a review on PR #11386.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 06 2025 at 14:51):

alexcrichton updated PR #11386.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 06 2025 at 14:51):

alexcrichton requested wasmtime-core-reviewers for a review on PR #11386.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 06 2025 at 16:15):

pchickey requested rvolosatovs for a review on PR #11386.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2025 at 09:04):

rvolosatovs submitted PR review:

It's a bit hard to keep track of all the changes, but I checked out the code locally to do a little overview and changes look good to me.

Is changing the wasip2 socket behavior a concern at all? (e.g. TcpSocket::new now returning "access denied")

view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2025 at 09:04):

rvolosatovs created PR review comment:

        let mut buf = Vec::with_capacity(DEFAULT_BUFFER_CAPACITY);

not introduced in this PR, but since we're changing all of these anyway, perhaps good to fix this one

view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2025 at 14:22):

alexcrichton updated PR #11386.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2025 at 14:23):

alexcrichton commented on PR #11386:

It's an intentional change yeah as I think it makes more sense to gate creation of sockets rather than gate operations on the sockets since it consolidates the check into just one place instead of having it spread out. It's also non-standard behavior in the sense that it's not specified in WASI itself, so it should be ok to tweak it's behavior over time. While the error is shuffled around disabling TCP and/or UDP still has the same effect where you can't do anything TCP/UDP-related once the options are disabled.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2025 at 14:23):

alexcrichton has enabled auto merge for PR #11386.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2025 at 14:58):

alexcrichton merged PR #11386.


Last updated: Dec 06 2025 at 07:03 UTC