Some WASM hosts advance monotonic time and schedule wakeups through host-managed events rather than the browser timer APIs used by Iroh today. In those environments, QUIC deadlines can stall while the isolate is suspended between I/O events.
I would like to add an unstable endpoint-level time source with two operations:
fn now(&self) -> QuicInstant;
fn sleep_until(&self, deadline: QuicInstant)
-> Pin<Box<dyn Future<Output = ()> + Send>>;
Iroh would adapt these futures internally to noq’s AsyncTimer; resetting a timer would replace and drop the obsolete sleep future. The default runtime would remain unchanged.
Non-goals are replacing task spawning, sockets, tracing, or shutdown, and no host-specific dependency would be added to Iroh. The API would remain behind an unstable feature.
I plan to work on this. Before opening the implementation for review, does this API boundary and placement on endpoint::Builder match the project’s preferred direction?
Some WASM hosts advance monotonic time and schedule wakeups through host-managed events rather than the browser timer APIs used by Iroh today. In those environments, QUIC deadlines can stall while the isolate is suspended between I/O events.
I would like to add an unstable endpoint-level time source with two operations:
Iroh would adapt these futures internally to noq’s
AsyncTimer; resetting a timer would replace and drop the obsolete sleep future. The default runtime would remain unchanged.Non-goals are replacing task spawning, sockets, tracing, or shutdown, and no host-specific dependency would be added to Iroh. The API would remain behind an unstable feature.
I plan to work on this. Before opening the implementation for review, does this API boundary and placement on
endpoint::Buildermatch the project’s preferred direction?