Crates.io | mdns-sd |
lib.rs | mdns-sd |
version | 0.12.0 |
source | src |
created_at | 2021-10-17 03:23:30.590795 |
updated_at | 2024-11-24 20:45:55.839132 |
description | mDNS Service Discovery library with no async runtime dependency |
homepage | |
repository | https://github.com/keepsimple1/mdns-sd |
max_upload_size | |
id | 466063 |
size | 397,273 |
This is a small implementation of mDNS (Multicast DNS) based service discovery in safe Rust, with a small set of dependencies. Some highlights:
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.
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.
The following table shows how much this implementation is compliant with RFCs regarding major features:
Feature | RFC section | Compliance | Notes |
---|---|---|---|
One-Shot Multicast DNS Queries (i.e. Legacy Unicast Responses) | RFC 6762 section 5.1 section 6.7 | ❌ | because we don't support Unicast yet. |
Unicast Responses | RFC 6762 section 5.4 | ❌ | |
Known-Answer Suppression | RFC 6762 section 7.1 | ✅ | |
Multipacket Known Answer Suppression querier | RFC 6762 section 7.2 | ✅ | |
Multipacket Known Answer Suppression responder | RFC 6762 section 7.2 | ❌ | because we don't support Unicast yet. |
Probing | RFC 6762 section 8.1 | ✅ | |
Simultaneous Probe Tiebreaking | RFC 6762 section 8.2 | ✅ | |
Conflict Resolution | RFC 6762 section 9 | ✅ | see DnsNameChange type |
Goodbye Packets | RFC 6762 section 10.1 | ✅ | |
Announcements to Flush Outdated Cache Entries | RFC 6762 section 10.2 | ✅ | i.e. cache-flush bit |
Cache Flush on Failure Indication | RFC 6762 section 10.4 | ✅ | API: ServiceDaemon::verify() |
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.