5 releases
| 0.1.4 | Feb 11, 2026 |
|---|---|
| 0.1.3 | Feb 11, 2026 |
| 0.1.2 | Feb 11, 2026 |
| 0.1.1 | Feb 10, 2026 |
| 0.1.0 | Feb 10, 2026 |
#34 in #dht
Used in 2 crates
87KB
1K
SLoC
rift-discovery
Peer discovery via mDNS and DHT for the riftd P2P protocol.
Part of the riftd project — serverless P2P voice + text chat over UDP.
What's in this crate?
rift-discovery combines local and wide-area peer discovery:
- mDNS Discovery — Find peers on the local network automatically
- DHT Discovery — Find peers anywhere on the internet
- Service Browsing — Discover rift channels and peers
- Peer Announcement — Advertise your presence
- Unified API — Single interface for all discovery methods
Usage
use rift_discovery::Discovery;
let discovery = Discovery::new(peer_id).await?;
// Start announcing
discovery.announce(channel_id).await?;
// Discover peers (combines mDNS + DHT)
let mut stream = discovery.discover();
while let Some(peer) = stream.next().await {
println!("Found peer: {:?}", peer);
}
How Discovery Works
- LAN — mDNS broadcasts find peers on the same network instantly
- Internet — DHT queries find peers anywhere (requires bootstrap)
- Invites — Direct connection via invite tokens (see rift-rndzv)
Related Crates
| Crate | Description |
|---|---|
| rift-dht | DHT implementation |
| rift-rndzv | Invite-based rendezvous |
| rift-mesh | Mesh networking layer |
Citation
If you use riftd in academic work, please cite:
de Beer, R. (2026). Predictive Rendezvous: Time–Intent–Deterministic Peer Coordination Without Infrastructure. Zenodo. https://doi.org/10.5281/zenodo.18528430
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Dependencies
~22–62MB
~1M SLoC