Skip to content
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

Implement the tcp interface of wasi-sockets. #6837

Merged
merged 16 commits into from
Aug 23, 2023

Conversation

sunfishcode
Copy link
Member

Implement the tcp, tcp-create-socket, and network interfaces of wasi-sockets.

The test doesn't pass yet, because I haven't figured out how to get it to build and run properly yet.

@sunfishcode sunfishcode marked this pull request as ready for review August 11, 2023 00:13
@sunfishcode sunfishcode requested review from a team as code owners August 11, 2023 00:13
@sunfishcode sunfishcode requested review from alexcrichton and removed request for a team August 11, 2023 00:13
@sunfishcode sunfishcode marked this pull request as draft August 11, 2023 00:13
@github-actions github-actions bot added the wasi Issues pertaining to WASI label Aug 11, 2023
@sunfishcode sunfishcode force-pushed the sunfishcode/sockets branch 6 times, most recently from 01a3660 to a1879d4 Compare August 16, 2023 15:47
@sunfishcode sunfishcode marked this pull request as ready for review August 16, 2023 20:07
Copy link
Contributor

@pchickey pchickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is excellent, I am very excited to see this land!

crates/wasi/src/preview2/host/network.rs Outdated Show resolved Hide resolved
crates/wasi/src/preview2/host/tcp.rs Outdated Show resolved Hide resolved
crates/wasi/src/preview2/host/tcp.rs Outdated Show resolved Hide resolved
crates/wasi/src/preview2/host/tcp.rs Outdated Show resolved Hide resolved
crates/wasi/src/preview2/host/tcp.rs Outdated Show resolved Hide resolved
crates/wasi/wit/deps/sockets/tcp.wit Show resolved Hide resolved
@sunfishcode sunfishcode added this pull request to the merge queue Aug 18, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 18, 2023
@sunfishcode sunfishcode added this pull request to the merge queue Aug 18, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 18, 2023
@sunfishcode sunfishcode added this pull request to the merge queue Aug 18, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Aug 18, 2023
@sunfishcode sunfishcode added this pull request to the merge queue Aug 18, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 18, 2023
@sunfishcode sunfishcode added this pull request to the merge queue Aug 18, 2023
@sunfishcode sunfishcode removed this pull request from the merge queue due to a manual request Aug 18, 2023
@sunfishcode sunfishcode force-pushed the sunfishcode/sockets branch 7 times, most recently from f8bde95 to 8b049ef Compare August 19, 2023 05:43
crates/test-programs/tests/wasi-sockets.rs Show resolved Hide resolved
crates/wasi/src/preview2/tcp.rs Outdated Show resolved Hide resolved
@sunfishcode sunfishcode added this pull request to the merge queue Aug 22, 2023
Merged via the queue into bytecodealliance:main with commit 2f6e977 Aug 23, 2023
31 checks passed
@sunfishcode sunfishcode deleted the sunfishcode/sockets branch August 23, 2023 00:07
eduardomourar pushed a commit to eduardomourar/wasmtime that referenced this pull request Sep 6, 2023
* Implement the `tcp` interface of wasi-sockets.

Implement the `tcp`, `tcp-create-socket`, and `network` interfaces of
wasi-sockets.

* Minor cleanups.

* Update to the latest upstream wasi-sockets.

* Address review feedback.

* Handle zero-length reads and writes, and other cleanups.

* Fix compilation on macOS.

* Fix compilation on Windows.

* Update all the copies of wasi-socket wit files.

* Sync up more wit files.

* Fix the errno code for non-blocking `connect` on Windows.

prtest:full

* Tolerate `NOTCONN` errors when cleaning up with `shutdown`.

* Simplify the polling mechanism.

This requires an updated tokio for `Interest::ERROR`.

* Downgrade to tokio 1.29.1 for now.

* Move `tcp_state` out of the `Arc`.

* `accept` doesn't need a write lock.

* Remove `tcp_state`'s `RwLock`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasi Issues pertaining to WASI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants