Stream: git-wasmtime

Topic: wasmtime / issue #7867 IPv6-only wasi-sockets implementation


view this post on Zulip Wasmtime GitHub notifications bot (Feb 03 2024 at 22:06):

SoniEx2 opened issue #7867:

Feature

An IPv6-only implementation of the wasi-sockets interface.

Benefit

There has recently been a strong push for IPv6-only networks, with the introduction of DHCP option 108 about 4 years ago, and many small and large deployments of networks supporting DHCP option 108. Further, mobile networks have been using IPv6-only through NAT64 and 464XLAT for much longer.

However, while IPv6-only networks are widely popular, IPv6-only OSes and kernels have not had the same luck, mainly due to ABI compatibility concerns. Thankfully, WASI does not currently share those concerns, putting it in a perfect spot to bring this change forward.

Implementation

The wasi-sockets implementation would be IPv6-only, and it would recognize the special NAT64 prefix 64::ff9b::/96 and treat it appropriately. On IPv6-only networks it would simply route those connections to the appropriate NAT64 gateway, while on dual-stack and IPv4-only networks it would unwrap them over the host IPv4 network. The toolchain (wasi-sdk, emscripten, etc) would have to provide its own CLAT-like functionality, a so-called "CLAT-in-libc".

Alternatives

"Doing nothing for now" is an option, but it does mean paying the cost of an IPv4 API deprecation cycle later.


Last updated: Dec 23 2024 at 12:05 UTC