Registry / networking / libmdns

libmdns

JSON →
library0.10.1rscratesunverified

mDNS Responder library for building discoverable LAN services in Rust.

# Cargo.toml [dependencies] libmdns = "0.10.1"
INSTALL
IMPORT
SIG · LIBMDNS
L
libmdns
networkingrustv0.10.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Responder
use libmdns::Responder;

Registers an mDNS service and keeps the responder alive.

use libmdns::Responder; fn main() { let responder = Responder::new().unwrap(); let _svc = responder.register("_http._tcp".to_owned(), "My Service", 8080, &[]); loop { std::thread::sleep(std::time::Duration::from_secs(1)); } }
Debug
Known issues
gotchaRequires root/administrator privileges on some systems to bind to port 5353.
fix
Run the application with elevated permissions or configure OS firewall.
affects: >=0.8.0
Upgrade
Version history
0.10.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
libmdns — cargo add libmdns · libregistry