#mdns #dns-sd #zeroconf #service #lan #protocols #tokio

libmdns

mDNS Responder library for building discoverable LAN services in Rust

25 releases

0.9.1 Aug 24, 2024
0.8.0 Jan 8, 2024
0.7.5 Mar 18, 2023
0.7.3 Nov 7, 2022
0.2.3 Jun 21, 2018

#240 in Network programming

Download history 4754/week @ 2024-08-23 5363/week @ 2024-08-30 4332/week @ 2024-09-06 4486/week @ 2024-09-13 5434/week @ 2024-09-20 3360/week @ 2024-09-27 3467/week @ 2024-10-04 3264/week @ 2024-10-11 3131/week @ 2024-10-18 3355/week @ 2024-10-25 2728/week @ 2024-11-01 2385/week @ 2024-11-08 3105/week @ 2024-11-15 3125/week @ 2024-11-22 3065/week @ 2024-11-29 2916/week @ 2024-12-06

12,521 downloads per month
Used in 52 crates (11 directly)

MIT license

96KB
2K SLoC

libmdns - Rust mDNS responder

libmdns is a pure rust implementation of the mDNS (RFC 6762) and DNS-SD (RFC 6763) protocols. This means that in response to UDP broadcasted DNS requests on port 5353, libmdns will broadcast a DNS response advertising the services you register.

Built with the tokio async runtime, libmdns can run in a dedicated thread, or be spawned with an existing tokio Handle.

Usage

To use it, add this to your Cargo.toml:

[dependencies]
libmdns = "0.9"

See the example for use within code.

Dependencies

libmdns' oldest supported Rust toolchain is 1.70.0, however it may compile fine on older versions of rust.

We hold no strong garantees for sticking to a Minimum Supported Rust Version. Please open an issue on GitHub if you need support for older compilers or different platforms.

libmdns is built with the help of the tokio 1.0 runtime.

Provenance Note

This project originally started as a fork of plietar/rust-mdns.

Contributing

Thankyou for considering contributing, any and all contributions are happily welcomed!

On the whole this library works. There is no-one actively seeking to improve it for it's own sake, and issues may not be immediately fixed. However if you're willing to open a Pull Request with changes to improve this project for your own uses in a way that doesn't sacrifice existing platform and feature support, I'll do my best to review, merge and release.

Dependencies

~4–31MB
~451K SLoC