Closed dicej closed 2 months ago
Am I correct in thinking that @sunfishcode has outstanding concerns here? (Just trying to figure out the status of this PR / where the ball is.)
Am I correct in thinking that @sunfishcode has outstanding concerns here? (Just trying to figure out the status of this PR / where the ball is.)
Yeah, IIUC @sunfishcode thinks maybe send
should flush to conform to POSIX error reporting expectations and @badeend thinks that's unnecessary overhead. I'm fine either way and will do whatever's necessary to get this merged. @badeend perhaps I could add the flush for now and we can revisit later just to keep this process moving?
IIUC @sunfishcode thinks maybe send should flush to conform to POSIX error reporting expectations and @badeend thinks that's unnecessary overhead.
I'm not worried about performance. The point I'm trying to get across is that, IMO, not flushing is the desired POSIX semantics. Waiting around for a potential error (through flushing) would break the non-blocking-ness of non-blocking sockets.
I think I'm not confident in the flush
situation yet, however I'm thinking that we can merge this PR as-is, once the conflicts are resolved, and figure out the right flush
usage over time.
Thanks!
This implements
socket
,connect
,recv
,send
, etc. in terms ofwasi-sockets
for thewasm32-wasi-preview2
target.I've introduced a new public header file:
__wasi_snapshot.h
, which will define a preprocessor symbol__wasilibc_use_preview2
if using thewasm32-wasi-preview2
version of the header, in which case we provide features only available for that target.