Skip to content

Implement the tcp interface of wasi-sockets.#6837

Merged
sunfishcode merged 16 commits into
bytecodealliance:mainfrom
sunfishcode:sunfishcode/sockets
Aug 23, 2023
Merged

Implement the tcp interface of wasi-sockets.#6837
sunfishcode merged 16 commits into
bytecodealliance:mainfrom
sunfishcode:sunfishcode/sockets

Conversation

@sunfishcode
Copy link
Copy Markdown
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
Copy Markdown
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!

Comment thread crates/wasi/src/preview2/host/network.rs Outdated
Comment thread crates/wasi/src/preview2/host/tcp.rs Outdated
Comment thread crates/wasi/src/preview2/host/tcp.rs Outdated
Comment thread crates/wasi/src/preview2/host/tcp.rs Outdated
Comment thread crates/wasi/src/preview2/host/tcp.rs Outdated
Comment thread crates/wasi/wit/deps/sockets/tcp.wit
@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 enabled auto-merge August 18, 2023 01:47
@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 enabled auto-merge August 18, 2023 02:51
@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 enabled auto-merge August 18, 2023 04:07
@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
Comment thread crates/test-programs/tests/wasi-sockets.rs
Comment thread crates/wasi/src/preview2/tcp.rs Outdated
@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
@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