wasmtime icon indicating copy to clipboard operation
wasmtime copied to clipboard

Add WASI sockets support to the C API

Open font opened this issue 3 years ago • 0 comments

Feature

The wasmtime CLI supports the --tcplisten and --listenfd options for WASI sockets support, but the C API is missing support for these same WASI socket features. This issue is to track adding support for WASI networking in the C API.

Benefit

This aids the ability for C applications that leverage the wasmtime C shared library API for executing WASM modules to support networking features for those modules.

Implementation

The existing WASI networking features that are supported in the wasmtime CLI code path need to be plumbed through to the C API. For example, this will involve expanding the wasi_config_t struct to add a field for preopened sockets as well as a new wasi_config_preopen_socket API for populating this new wasi_config_t preopened sockets field.

Alternatives

font avatar Oct 18 '22 21:10 font