rift-wasm
Part of the riftd project — serverless P2P voice + text chat over UDP.
What's in this crate?
rift-wasm brings rift to the browser:
- WasmClient — Browser-compatible rift client
- E2EE — Encrypt/decrypt messages in the browser
- Voice Encoding — Encode/decode voice frames
- Audio Utilities — Level detection, gain, mixing
- PCM Conversion — Float32 ↔ PCM16 for Web Audio API
Usage
import init from 'rift-wasm';
await ;
const client = ;
// Encrypt a message
const encrypted = client.;
// Encode voice for transmission
const encoded = client.;
// Audio utilities
const level = ;
const isActive = ;
Building
# Install wasm-pack
# Build for web
# Build for bundlers
Browser Prototype
See README.browser.md for the browser demo setup.
Related Crates
| Crate | Description |
|---|---|
| rift-core | Core types and crypto |
| rift-protocol | Message encoding |
| rift-sdk | Native SDK |
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.