You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the last WASI meeting the subject of socket preopens came up, and how to handle them in preview2.
pchickey noted that he has been asking around if they're actually in use anywhere. So far without result.
Me myself I've found exactly one usage so far:
There's unofficial WASI support for .NET. Even though they make use of preopens, it appears they don't actually want to.
Other uses of sockets in Wasm mostly seem based on home-grown solutions. For example Docker has native Wasm support in preview. Networking capabilities are provided through WasmEdge's non-standard socket extensions. They do not make use of preopens. Similar story for Wasmer.
First off: If you make use of preview1 sockets, please let us know!
My stance so far: Unless people come pouring in with use cases, I don't think its worth the effort of maintaining two different mechanisms of obtaining socket handles (one being individual socket preopens, the other being through the "preopened" network handle).
The systemd usecase can be transparently handled by the host: before making the actual bind syscall it can check if there are any unused preopened sockets bound to that address. If so: swap over to that socket instead.
Although I was the one who brought it up the the WASI meeting, I have no strong feelings about this nor any applications that use preopened sockets, so I'd be fine with what @badeend proposes above.
In the last WASI meeting the subject of socket preopens came up, and how to handle them in preview2.
pchickey noted that he has been asking around if they're actually in use anywhere. So far without result.
Me myself I've found exactly one usage so far:
There's unofficial WASI support for .NET. Even though they make use of preopens, it appears they don't actually want to.
Other uses of sockets in Wasm mostly seem based on home-grown solutions. For example Docker has native Wasm support in preview. Networking capabilities are provided through WasmEdge's non-standard socket extensions. They do not make use of preopens. Similar story for Wasmer.
First off: If you make use of preview1 sockets, please let us know!
Second, Dan noted that SystemD's socket activation could be a valid use case for socket preopens.
CC @dicej
The text was updated successfully, but these errors were encountered: