WebAssembly / wasi-sockets

WASI API proposal for managing sockets
Other
249 stars 22 forks source link

remove native ipv4 #31

Open SoniEx2 opened 1 year ago

SoniEx2 commented 1 year ago

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

badeend commented 1 year ago

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.

SoniEx2 commented 1 year ago

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).

chrysn commented 1 year ago

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).