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 |
#63 in #voice
575KB
12K
SLoC
rift-sdk
High-level SDK for building applications with the riftd P2P protocol.
Part of the riftd project — serverless P2P voice + text chat over UDP.
What's in this crate?
rift-sdk is the easiest way to add P2P voice and text chat to your app:
- Simple API — High-level abstractions over the mesh
- Auto Discovery — mDNS + DHT peer finding
- NAT Traversal — Just works™ (hole punch + TURN fallback)
- E2EE by Default — All messages encrypted end-to-end
- Voice Calls — Opus-encoded voice with QoS adaptation
- Cross-Platform — Desktop, mobile (via FFI), and WASM
Usage
use rift_sdk::{RiftConfig, RiftClient};
#[tokio::main]
async fn main() -> Result<()> {
let config = RiftConfig::default();
let client = RiftClient::new(config).await?;
// Join a channel
client.join("my-channel").await?;
// Send a message
client.send_chat("Hello, world!").await?;
// Start a voice call
client.start_call(peer_id).await?;
// Handle events
while let Some(event) = client.next_event().await {
match event {
RiftEvent::Chat { from, message } => println!("{}: {}", from, message),
RiftEvent::CallStarted { peer } => println!("Call with {}", peer),
_ => {}
}
}
Ok(())
}
Features
ffi— C FFI bindings for mobile/native integrationandroid— Android JNI bindings
Platform Support
| Platform | Status |
|---|---|
| Linux | ✅ Full support |
| macOS | ✅ Full support |
| Windows | ✅ Full support |
| Android | ✅ Via JNI |
| iOS | 🚧 Planned |
| Web | ✅ Via rift-wasm |
Related Crates
| Crate | Description |
|---|---|
| rift-mesh | Low-level mesh networking |
| rift-media | Audio capture/playback |
| rift-wasm | Browser bindings |
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
~26–70MB
~1M SLoC