Skip to content

Comments

wasip3: implement fcntl#745

Draft
rvolosatovs wants to merge 3 commits intoWebAssembly:mainfrom
rvolosatovs:p3-fcntl
Draft

wasip3: implement fcntl#745
rvolosatovs wants to merge 3 commits intoWebAssembly:mainfrom
rvolosatovs:p3-fcntl

Conversation

@rvolosatovs
Copy link
Contributor

@rvolosatovs rvolosatovs commented Feb 20, 2026

Implement fcntl

Eventually, we should unify the UDP implementations (#728 (review)). If most other socket-related PRs are merged, I might tackle this next week Monday, otherwise it seems that doing so now would introduce quite a bit of churn.

This is blocked on #725

Unfortunately, due to the way sockets-nonblocking-udp is set up we cannot implement support for UDP just in socket and nowhere else, so bring along some fairly trivial UDP logic from wasip2 and introduce an abort() in poll for now.

TEST(bind(server_socket_fd, (struct sockaddr *)&server_address,
sizeof(server_address)) != -1);

alexcrichton and others added 3 commits February 20, 2026 20:00
Move the implementation for WASIp2 to a shared location and then use
`#define`s/`typedef`s to get the shared structure compiling since the
functionality supported by WASIp2/WASIp3 is effectively the same.
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
@alexcrichton
Copy link
Collaborator

Upon reflection about #725, I actually think it'd be best to go in a different direction. WDYT about merging wasip{2,3}_tcp.c and tcp_sockopt.c all in one file? Similar for wasip{2,3}_udp.c and having that all in one file.

I'd like to by-default share things and we can split helpers out if necessary, but I think there's going to be a lot more shared code than not in the structure of these files.

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.

2 participants