Skip to content

Added sock_recv_msg, sock_send_msg - #8

Draft
sadhbh-c0d3 wants to merge 2 commits into
wasix-org:mainfrom
Anodized-Titanium:socket-send-recv-msg
Draft

Added sock_recv_msg, sock_send_msg#8
sadhbh-c0d3 wants to merge 2 commits into
wasix-org:mainfrom
Anodized-Titanium:socket-send-recv-msg

Conversation

@sadhbh-c0d3

@sadhbh-c0d3 sadhbh-c0d3 commented Jun 9, 2026

Copy link
Copy Markdown

Summary

Adds WASIX WITX ABI definitions for sock_send_msg and sock_recv_msg.

These syscalls model the WASIX side of POSIX sendmsg() / recvmsg() using:

  • existing scatter/gather data iovecs,
  • an optional socket address pointer,
  • a raw control-message pointer and byte length,
  • explicit returned data/control lengths.

This also adds the minimal WASIX control-message ABI shape needed for future ancillary data support:

  • sock_cmsg
  • sock_cmsg_level
  • sock_cmsg_type
  • SOCKET control-message level
  • RIGHTS control-message type, corresponding to POSIX SCM_RIGHTS

Motivation

libuv and Node-style runtimes use sendmsg() / recvmsg() for IPC paths, especially socketpair-based communication and file-descriptor passing. WASIX did not have ABI-level operations that could represent these calls, which forced libc/runtime layers either to avoid the POSIX path or to use incomplete workarounds.

This WITX change gives wasix-libc a proper ABI target for POSIX-compatible sendmsg() / recvmsg() wrappers, and gives Wasmer a runtime syscall surface where payload transfer works now and ancillary/control-message handling can be implemented cleanly next.

Related implementation work lives in the matching wasix-libc and Wasmer PRs.

@sadhbh-c0d3
sadhbh-c0d3 marked this pull request as draft June 9, 2026 17:07
@sadhbh-c0d3
sadhbh-c0d3 marked this pull request as ready for review June 9, 2026 18:16
@sadhbh-c0d3
sadhbh-c0d3 marked this pull request as draft June 10, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant