Send recv msg wasi#6
Draft
sadhbh-c0d3 wants to merge 8 commits into
Draft
Conversation
…dding a trampoline
…ct avoids the unsupported AF_UNSPEC connect() trick. WASIX connected-state checks now trust libuv’s handle flag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enable the normal POSIX
sendmsg()/recvmsg()paths inlibuv-wasixinstead of compiling them out on WASI.This lets libuv use the same IPC stream machinery on WASIX as it does on Unix-like platforms, including socketpair-based process/cluster IPC paths.
Motivation
libuvusessendmsg()/recvmsg()for IPC streams and handle-passing paths. The WASI branch previously disabled those paths and returnedENOSYS, which meant readable IPC fds could wake correctly but libuv still refused to consume the payload.This blocked Node/EdgeJS child-process and cluster-style IPC. In particular, the parent process could receive readiness for the child IPC channel, but
uv__read()would fail before reading the message.WASIX now has libc/runtime support for payload-only
sendmsg()/recvmsg()viasock_send_msg/sock_recv_msg, so libuv should use the normal POSIX code path.Changes
sendmsg()/recvmsg()stream paths.Context
This is part of the WASIX POSIX compatibility work for Node-style IPC:
wasix-witxdefines thesock_send_msg/sock_recv_msgABI;wasix-libctranslates POSIXsendmsg()/recvmsg()to that ABI;Descriptor passing via
SCM_RIGHTSis still phase 2 runtime work. This change enables the path and payload transfer; it does not by itself implement fd passing semantics.Testing
Validated with EdgeJS/QuickJS WASIX IPC and cluster-focused tests, including the diagnostics-channel process IPC path that previously woke but failed to read the IPC payload.