compio-native async mDNS / DNS-SD — responder, querier, and discovery on a
thread-per-core, completion-based runtime.
Introduction
hick-compio drives the Sans-I/O core (mdns-proto) over compio, a
completion-based (io_uring / IOCP) thread-per-core runtime, using the multicast
socket helpers from hick-udp.
For the tokio / smol runtimes, use hick-reactor or the hick facade
instead.
Installation
[]
= "0.1"
Example
Run inside a compio runtime (the driver is !Send, thread-per-core):
use ;
async
Feature flags
| Feature | Description |
|---|---|
tracing |
Forward structured tracing spans/events from the driver and mdns-proto. |
stats |
Enable atomic counters; read a snapshot via endpoint.stats(). |
metrics |
Bridge counters to the metrics facade (Prometheus/StatsD). Implies stats. |
Observability
Enable features = ["tracing"] to have the driver emit tracing events
during socket I/O, service probing, and query state transitions.
Enable features = ["stats"] and call endpoint.stats() to obtain a
hick_trace::stats::StatsSnapshot:
let snap = endpoint.stats;
println!;
Enable features = ["metrics"] to additionally forward every counter/gauge
update to the metrics facade automatically.
Design
!Sendthroughout: noArc, noMutex, no atomics, no MPSC channels.- One spawned driver future per endpoint, owning the compio
UdpSocket(s) and pumping aselect!over two in-flightrecv_msgs (v4 + v6), asleep_untiltimer, and aLocalNotify. - Handles (
Query,Service,Lookup) holdRc<EndpointInner>and borrow shared state directly under short, non-.awaitborrows.
The hick family
hick (facade) · mdns-proto (Sans-I/O core) · hick-udp (UDP) ·
hick-reactor (tokio / smol driver) · hick-compio (this crate) ·
hick-smoltcp (smoltcp engine) · hick-embassy (embassy driver).
License
hick-compio is under the terms of both the MIT license and the Apache License
(Version 2.0).
See LICENSE-APACHE, LICENSE-MIT for details.
Copyright (c) 2025 Al Liu.