1 unstable release
new 0.1.1 | Jan 11, 2025 |
---|---|
0.1.0 |
|
#1592 in Network programming
155KB
3.5K
SLoC
Agnostic mDNS
Async runtime agnostic, simple and lightweight mDNS client/server library in Rust.
Port HashiCorp's mdns to Rust.
Introduction
Async runtime agnostic, simple and lightweight mDNS client/server library in Rust. mDNS or Multicast DNS can be used to discover services on the local network without the use of an authoritative DNS server. This enables peer-to-peer discovery. It is important to note that many networks restrict the use of multicasting, which prevents mDNS from functioning. Notably, multicast cannot be used in any sort of cloud, or shared infrastructure environment. However it works well in most office, home, or private infrastructure environments.
Installation
-
tokio
[dependencies] agnostic-mdns = { version = "0.1", features = ["tokio"] }
-
async-std
[dependencies] agnostic-mdns = { version = "0.1", features = ["async-std"] }
-
smol
[dependencies] agnostic-mdns = { version = "0.1", features = ["smol"] }
Examples
Please see examples.
Pedigree
-
This mdns code is port from HashiCorp's mdns implementation.
-
The DNS message encoding/decoding is inspired by miekg's dns implementation.
License
agnostic-mdns
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.
Dependencies
~15–46MB
~743K SLoC