Skip to content

Implement net for WASIp3 - #163

Open
adamrk wants to merge 4 commits into
mainfrom
abk/net-p3
Open

adamrk wants to merge 4 commits into
mainfrom
abk/net-p3

Conversation

@adamrk

@adamrk adamrk commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #161

Based on #162

@adamrk
adamrk force-pushed the abk/net-p3 branch 2 times, most recently from b25f493 to 3ec7de0 Compare September 22, 2026 14:04
Comment thread src/net/tcp_listener.rs Outdated
Comment on lines +106 to +109
let (input, _receive_result) = socket.receive();
let (output, receiver) = wasip3::wit_stream::new();
let _send_result = socket.send(receiver);
Ok(TcpStream::new(input, output, socket))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We could save _receive_result and _send_result in the TcpStream and add a graceful shutdown method which checks them. But that should probably be a separate follow up.

@adamrk
adamrk marked this pull request as ready for review September 22, 2026 14:14
@pchickey
pchickey added this pull request to stack #165 September 25, 2026 18:20
Base automatically changed from abk/io-p3 to main October 1, 2026 14:06
@adamrk
adamrk requested a review from pchickey October 1, 2026 14:09

@pchickey pchickey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm a little torn whether to ask you to decompose the tcp_listener, tcp_stream, and udp.rs in the sys style - theyre not ideal the way they are, but they at least have more in common than elsewhere. I am OK landing it like this and if we need to change the way they're factored down the line we always can come back to it.

@adamrk

adamrk commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

No problem, I just moved it to use the sys modules.

@adamrk
adamrk requested a review from pchickey October 2, 2026 17:26

This branch has not been deployed

No deployments
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.

Implement net on WASIp3

2 participants