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

remove native ipv4

Open SoniEx2 opened this issue 2 years ago • 3 comments
trafficstars

protocols as 464XLAT are great and should be the default.

SoniEx2 avatar Mar 28 '23 11:03 SoniEx2

Could you please elaborate a bit more on what this would entail in the context of WASI? Both from the perspective of WASI embedders and WASI guest (toolchain) code.

badeend avatar Mar 30 '23 18:03 badeend

to put it simple an embedder would have to provide NAT64 (unwrapping IPv6 packets into IPv4 packets) and DNS64 (converting IPv4 DNS records into IPv6 DNS records) which are fairly trivial, and a toolchain would have to provide a 464XLAT CLAT (effectively, encoding IPv4 packets in IPv6 packets).

even if this is completely transparent to the applications, "raw wasi" applications would have to use IPv6 directly, which would hopefully encourage them to just support IPv6 (tho we're certain some folks would opt to only support 464XLAT for no good reason).

SoniEx2 avatar Mar 30 '23 21:03 SoniEx2

For implementers of the WASI API, this has the advantage that they only have one target to translate WASI operations to. Most OSes have built-in support for IPv4 over IPv6 sockets, so the implementer really has to do one thing only (and then set a few flags such as AI_V4MAPPED=1 or V6ONLY=0).

chrysn avatar May 30 '23 20:05 chrysn