bytecodealliance / bytecodealliance/wasmtime

IPv6-only wasi-sockets implementation

Open
#7,867 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
18.6k
Forks
1.8k
Avg merge
1d 18h
Merged PRs (30d)
126

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.