Expand description
Agnostic mDNS
Simple and lightweight mDNS client/server library for any async runtime.
Port HashiCorp’s mdns to Rust.
§Introduction
Simple and lightweight mDNS client/server library for any async runtime. 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.4", features = ["tokio"] } -
async-std[dependencies] agnostic-mdns = { version = "0.4", features = ["async-std"] } -
smol[dependencies] agnostic-mdns = { version = "0.4", features = ["smol"] }
§Examples
Please see examples.
§Pedigree
- This mdns code is port and refactor based on HashiCorp’s mdns 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.
Re-exports§
pub use service::Service;pub use service::ServiceBuilder;pub use iprobe as netprobe;
Modules§
- async_
std async-std - Types for
async-stdruntime - error
- The error type for the mDNS protocol
- service
- A builtin service that can be used with the mDNS server
- smol
smol - Types for
smolruntime - sync
- synchronous mDNS server implementation
- tokio
tokio - Types for
tokioruntime - worksteal
worksteal - Generic asynchronous mDNS implementation for work stealing runtimes
Macros§
- format_
smolstr - Formats arguments to a
SmolStr, potentially without allocating.
Structs§
- Label
- A DNS name.
- Query
Param - How a lookup is performed.
- Server
Options - The options for [
Server]. - SmolStr
- A
SmolStris a string type that has the following properties: