-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft of WASI Preview 2 support, featuring wasi-sockets
#449
Closed
Closed
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
6da9ef8
first draft of socket support
dicej 95454e8
support non-blocking sockets
dicej e961d20
close Preview 2 handles in close(2)
dicej 9d98fe3
add getaddrinfo and setsockopt, etc.
dicej 1937e94
Implement TCP based on preview2 wasi-sockets
badeend c7eda81
Ignore .vscode
badeend a14b30d
Merge branch 'sockets' of https://github.com/dicej/wasi-libc into tcp…
badeend f3a1106
Fix errors after merge
badeend ae41e77
Perform implicit bind in Listen
badeend a00da21
Implement MSG_DONTWAIT flag
badeend b120ad4
"Implement" MSG_NOSIGNAL
badeend ee04f9e
No need for these constant to match their preview1 counterparts anymo…
badeend ea2fcf0
Make my own TODOs easier to find
badeend 6cf2c3b
Decode IP addresses
badeend 76160c3
Replace assert with abort
badeend 6bb179a
Update libc-bottom-half/cloudlibc/src/libc/sys/socket/recv.c
badeend 5af19d5
Merge pull request #1 from badeend/tcp-sockets
dicej 74b703e
add `TCP_NODELAY` support
dicej 0762651
Update to preview2 version rc-2023-11-10. And use the new --rename op…
badeend 7112e67
Merge branch 'sockets' of https://github.com/dicej/wasi-libc into upd…
badeend 879d533
TCP_NODELAY was removed in rc-2023-11-10
badeend 9ab49f3
Update to rc-2023-12-05
badeend eb3602d
Implement remaining socket options introduced in rc-2023-11-10
badeend 91b0a92
Represent tagged unions as a single type instead of three.
badeend 1e97c2e
Open & close UDP sockets
badeend e0f4314
UDP socket options
badeend c11533a
Keep track of the address family ourselves, because we'll need it qui…
badeend 4fc628c
Refactor sockaddr validation:
badeend ebb3e3f
add basic `TCP_NODELAY` support to `setsockopt`
dicej 253f895
add netdb.h-related stubs
dicej e09d83b
Implement recv&send using recvfrom&sendto
badeend 8f7dd8c
UDP bind
badeend f780765
Split up Bound state
badeend 743718d
Reimplement TCP_NODELAY. (#3)
badeend f60a655
UDP connect
badeend 954bae8
Fix trap/abort when calling getsockname or getpeername too soon
badeend fac12b2
UDP getsockname & getpeername
badeend 9eb88b1
add `wasi-sockets` support for `poll` and `ioctl`
dicej 2680196
Refactor `stream` state transition
badeend 9e9171f
UDP send and recv
badeend eb50594
Merge branch 'sockets' of https://github.com/dicej/wasi-libc into udp
badeend 02285af
Fix build errors after pull
badeend b984f46
Fix incompatible signature of poll
badeend 2a24635
free ready list after polling
dicej a81b074
Merge remote-tracking branch 'badeend/udp' into sockets
dicej 955e4d7
use a single assignment when updating TCP state
dicej 6be1e1a
build for Preview 1 and 2 separately
dicej 24c7bb7
use separate include dirs for each target
dicej e8925b3
add (slightly modified) socket.c to test list
dicej 5112461
re-enable `check-symbols`
dicej fc38c7a
add instructions to `make-bindings.sh`
dicej 14757da
revert spurious whitespace changes
dicej f0c29d4
fix out-of-date comment in descriptor_table.c
dicej bc1b85a
use AF_INET6 when creating a sockaddr_in6
dicej 2a61396
implement `getaddrinfo`
dicej b46fcaf
fix backwards logic in `ioctl`
dicej ef83aa6
allow TCP_SOCKET_STATE_CONNECT_FAILED sockets to be polled
dicej 0b50784
support TCP_SOCKET_STATE_LISTENING sockets in poll
dicej 1db6e1a
return `getaddrinfo` results in order
dicej 5b1ae5e
honor ai_family hint in getaddrinfo
dicej 9c4d23a
add UDP support to ioctl
dicej 7c28169
add fake SO_REUSEADDR support
dicej 69842d6
add UDP support to poll
dicej c7eeb21
re-implement pselect using poll
dicej 32f3a06
convert nanoseconds to milliseconds in pselect
dicej f3adffe
return zero from recv on STREAMS_STREAM_ERROR_CLOSED
dicej a3fb845
update bindings to WASI 0.2.0
dicej 60e3428
update tests to use Wasmtime 17
dicej File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
sysroot | ||
build | ||
.vscode | ||
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put editor-specific paths in your own global git ignore file, rather than in repository .gitignore files.