wasi-sockets icon indicating copy to clipboard operation
wasi-sockets copied to clipboard

Export sockets

Open SoniEx2 opened this issue 1 year ago • 4 comments

Instead of binding sockets, sockets should be exported, and the host should bind them. Sockets should be address-neutral, it's the application's responsibility to accept the addresses provided by the host. If the host decides to bind an exported socket to IPv6 or even UDS, then the guest has to just deal with it.

SoniEx2 avatar Oct 30 '24 21:10 SoniEx2

I don't understand what you're proposing. Do you mind elaborating?

Keep in mind the goal of this proposal:

Toolchains must be able to provide a POSIX compatible interface on top of the functions introduced in this proposal.

badeend avatar Oct 31 '24 11:10 badeend

we're trying to come up with a way to force ipv6 migration.

personally we're doing things such as making ipv6-only server software and telling customers to use a SIIT-DC - especially on ipv4-only networks. but we can't help but notice wasm and wasi-sockets are a big deal on the server, and it's unfortunate that no effort has been made to push towards ipv6 migration in these specifications.

SoniEx2 avatar Oct 31 '24 11:10 SoniEx2

it's unfortunate that no effort has been made to push towards ipv6 migration in these specifications.

Is there something new you want to put forward that hasn't already been discussed in https://bytecodealliance.zulipchat.com/#narrow/channel/219900-wasi/topic/ipv6-only.20.28464XLAT.2FSIIT-DC.29 ?

badeend avatar Oct 31 '24 12:10 badeend

there's the fact we gave up on ipv6-only OS for now, entirely due to signal handling. POSIX requires sockets to be signal-safe.

but we can come up with other approaches, like ipv6-only server software, trying to push new programming languages (including wasm) to go ipv6-only, and worst case we can still deploy Po4.

SoniEx2 avatar Oct 31 '24 12:10 SoniEx2