Stream: git-wasmtime

Topic: wasmtime / PR #6837 Implement the `tcp` interface of wasi...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2023 at 00:13):

sunfishcode opened PR #6837 from sunfishcode:sunfishcode/sockets to bytecodealliance:main:

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.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2023 at 00:13):

sunfishcode requested alexcrichton for a review on PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2023 at 00:13):

sunfishcode requested wasmtime-core-reviewers for a review on PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2023 at 00:13):

sunfishcode requested wasmtime-default-reviewers for a review on PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2023 at 00:13):

sunfishcode has marked PR #6837 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 14 2023 at 22:18):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2023 at 20:10):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2023 at 20:33):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2023 at 20:35):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2023 at 20:54):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2023 at 21:26):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2023 at 21:57):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 16 2023 at 15:47):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 16 2023 at 18:06):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 16 2023 at 20:07):

sunfishcode has marked PR #6837 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 16 2023 at 21:16):

pchickey submitted PR review:

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

view this post on Zulip Wasmtime GitHub notifications bot (Aug 16 2023 at 21:16):

pchickey submitted PR review:

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

view this post on Zulip Wasmtime GitHub notifications bot (Aug 16 2023 at 21:16):

pchickey created PR review comment:

            _ => unreachable!(),

view this post on Zulip Wasmtime GitHub notifications bot (Aug 16 2023 at 21:16):

pchickey created PR review comment:

I guess we also set the state without making the pollable ready as well, so maybe there should be two methods for it? set and set_and_wake?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 16 2023 at 21:16):

pchickey created PR review comment:

I'm pretty sure this implementation is correct, but when I've needed this in the past I copy-pasted the unstable implementation out of std, and left a comment of its provenance and to replace it with std::task::Waker::noop() once noop_waker stabilizes https://github.com/rust-lang/rust/pull/96875/files#diff-94c4720cc6dcbfa0ca91afcfe1f20fad1ff4e7ab403417110fb1af3305aad23e

view this post on Zulip Wasmtime GitHub notifications bot (Aug 16 2023 at 21:16):

pchickey created PR review comment:

Instead of panicking if this conversion fails, can we make this a TryFrom and trap execution instead?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 16 2023 at 21:16):

pchickey created PR review comment:

Can we consolidate this pattern of setting the new state and then sending () into a single method?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 16 2023 at 21:16):

pchickey created PR review comment:

Not a problem with this PR, but I guess I just realized there are competing whitespace styles in the wasi wits, so maybe someone needs to invent witfmt so we never have to think about them again

view this post on Zulip Wasmtime GitHub notifications bot (Aug 17 2023 at 00:07):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 17 2023 at 03:04):

sunfishcode submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 17 2023 at 03:04):

sunfishcode created PR review comment:

The obvious set and set_and_wake would require dropping and re-acquiring the lock. We don't need to worry about threads here just yet, but when we do, we'll need to hold onto that lock. So I factored out some different utility functions here, in a way that should still help ensure that we get the sequence right.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 17 2023 at 16:14):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 17 2023 at 23:52):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2023 at 01:46):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2023 at 01:47):

sunfishcode has enabled auto merge for PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2023 at 02:51):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2023 at 02:51):

sunfishcode has enabled auto merge for PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2023 at 04:06):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2023 at 04:07):

sunfishcode has enabled auto merge for PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2023 at 04:23):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2023 at 04:26):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2023 at 12:57):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2023 at 13:55):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2023 at 20:20):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2023 at 20:40):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2023 at 20:57):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 19 2023 at 01:27):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 19 2023 at 02:03):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 19 2023 at 03:41):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 19 2023 at 04:14):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 19 2023 at 04:50):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 19 2023 at 05:43):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 22 2023 at 15:02):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 22 2023 at 17:18):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 22 2023 at 17:18):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 22 2023 at 17:18):

pchickey created PR review comment:

rather than listing these out explicitly, can you use command::add_to_linker to get them all?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 22 2023 at 17:18):

pchickey created PR review comment:

from my reading of these changes, set_state is only ever performed when in an &mut self method of WasiView, rather than in a spawned task, which makes me think theres no longer a need for an arc and locking for that member. Can we lift it out to be in HostTcpSocket and manipulate it with plain old &mut?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 22 2023 at 20:48):

sunfishcode updated PR #6837.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 22 2023 at 21:24):

sunfishcode submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 22 2023 at 21:24):

sunfishcode created PR review comment:

Done

view this post on Zulip Wasmtime GitHub notifications bot (Aug 22 2023 at 21:24):

sunfishcode submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 22 2023 at 21:24):

sunfishcode created PR review comment:

Done

view this post on Zulip Wasmtime GitHub notifications bot (Aug 23 2023 at 00:08):

sunfishcode merged PR #6837.


Last updated: Oct 23 2024 at 20:03 UTC