#mdns #discovery #service-discovery #zeroconf #dns-sd


mDNS Service Discovery library with no async runtime dependency

28 releases

new 0.8.0 Oct 1, 2023
0.7.4 Aug 5, 2023
0.7.3 Apr 29, 2023
0.7.2 Mar 27, 2023
0.1.0 Oct 17, 2021

#155 in Network programming

Download history 5225/week @ 2023-06-12 5843/week @ 2023-06-19 7420/week @ 2023-06-26 6598/week @ 2023-07-03 3968/week @ 2023-07-10 3003/week @ 2023-07-17 906/week @ 2023-07-24 879/week @ 2023-07-31 846/week @ 2023-08-07 929/week @ 2023-08-14 564/week @ 2023-08-21 733/week @ 2023-08-28 748/week @ 2023-09-04 941/week @ 2023-09-11 948/week @ 2023-09-18 829/week @ 2023-09-25

3,546 downloads per month
Used in 21 crates (9 directly)

Apache-2.0 OR MIT



Build Cargo docs.rs

This is a small implementation of mDNS (Multicast DNS) based service discovery in safe Rust, with a small set of dependencies. Some highlights:

  • supports both the client (querier) and the server (responder) uses.
  • supports macOS, Linux and Windows.
  • works with both sync and async code.
  • no dependency on any async runtimes.


We are not using async/.await internally, instead we create a new thread to run a mDNS daemon.

The API interacts with the daemon via flume channels that work easily with both sync and async code. For more details, please see the documentation.

Compatibility and Limitations

This implementation is based on the following RFCs:

This is still beta software. We focus on the common use cases at hand. And we tested with some existing common tools (e.g. Avahi on Linux, dns-sd on MacOS, and Bonjour library on iOS) to verify the basic compatibility.

Currently this library has the following limitations:

  • Only support IPv4, not IPv6.
  • Only support multicast, no unicast send/recv.

Minimum Rust version

Tested against Rust 1.61.0


Licensed under either of

at your option.


Contributions are welcome! Please open an issue in GitHub if any questions.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the above license(s), shall be dual licensed as above, without any additional terms or conditions.


~75K SLoC