From fae1ac4baa174d3fd596b54a8a72e7429acd5077 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Thu, 10 Oct 2024 07:49:53 -0600 Subject: [PATCH] add WASIp2 TODO comments // TODO #1: Add a public, WASIp2-only API for registering // `wasi::io::poll::Pollable`s directly (i.e. those which do not correspond to // any `wasi-libc` file descriptor, such as `wasi:http` requests). // // TODO #2: Add support for binding, listening, and accepting. This would // involve adding cases for `TCP_SOCKET_STATE_UNBOUND`, // `TCP_SOCKET_STATE_BOUND`, and `TCP_SOCKET_STATE_LISTENING` to the `match` // statements in `Selector::select`. // // TODO #3: Add support for UDP sockets. This would involve adding cases for // the `UDP_SOCKET_STATE_*` tags to the `match` statements in // `Selector::select`. Signed-off-by: Joel Dice --- src/sys/wasi/p2.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/sys/wasi/p2.rs b/src/sys/wasi/p2.rs index cff90f7ea..c7377db28 100644 --- a/src/sys/wasi/p2.rs +++ b/src/sys/wasi/p2.rs @@ -24,6 +24,19 @@ // API (see the `netc` module below) to do so. Once // https://github.com/WebAssembly/wasi-libc/issues/542 is addressed, we'll be // able to switch to a public API. +// +// TODO #1: Add a public, WASIp2-only API for registering +// `wasi::io::poll::Pollable`s directly (i.e. those which do not correspond to +// any `wasi-libc` file descriptor. +// +// TODO #2: Add support for binding, listening, and accepting. This would +// involve adding cases for `TCP_SOCKET_STATE_UNBOUND`, +// `TCP_SOCKET_STATE_BOUND`, and `TCP_SOCKET_STATE_LISTENING` to the `match` +// statements in `Selector::select`. +// +// TODO #3: Add support for UDP sockets. This would involve adding cases for +// the `UDP_SOCKET_STATE_*` tags to the `match` statements in +// `Selector::select`. use crate::{Interest, Token}; use netc as libc;