#p2p #dht #kademlia

rift-dht

Distributed hash table for Rift P2P peer discovery

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

#9 in #kademlia


Used in 3 crates (2 directly)

Apache-2.0 OR MIT

66KB
938 lines

rift-dht

riftd

crates.io docs.rs License DOI

Distributed hash table for peer discovery in the riftd P2P protocol.


Part of the riftd project — serverless P2P voice + text chat over UDP.

What's in this crate?

rift-dht enables wide-area peer discovery without central servers:

  • Kademlia DHT — Built on libp2p's battle-tested implementation
  • Peer Announcement — Publish your presence to the network
  • Peer Lookup — Find peers by channel or peer ID
  • Bootstrap Nodes — Connect to the network via known entry points
  • Automatic Routing — Efficient peer routing tables

Usage

use rift_dht::DhtNode;

let dht = DhtNode::new(config).await?;

// Announce presence
dht.announce(peer_id, channel_id).await?;

// Find peers in a channel
let peers = dht.find_peers(channel_id).await?;
Crate Description
rift-discovery Combined mDNS + DHT discovery
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

~21–62MB
~886K SLoC