whatsapp-rust
A high-performance, async Rust library for the WhatsApp Web API. Inspired by whatsmeow (Go) and Baileys (TypeScript).
Documentation | llms.txt | llms-full.txt
Features
- Authentication — QR code pairing, pair code linking, persistent sessions
- Messaging — E2E encrypted (Signal Protocol), 1-on-1 and group chats, editing, reactions, quoting, receipts
- Media — Upload/download images, videos, documents, GIFs, audio with automatic encryption
- Groups & Communities — Create, manage, invite, membership approval, subgroup linking
- Newsletters — Create, join, send messages, reactions
- Status — Text, image, and video status posts with privacy controls
- Contacts — Phone number lookup, profile pictures, user info, business profiles
- Presence & Chat State — Online/offline, typing indicators, blocking
- Chat Actions — Archive, pin, mute, star messages
- Profile — Set push name, status text, profile picture
- Privacy — Fetch/set privacy settings, disappearing messages
- Modular — Pluggable storage, transport, HTTP client, and async runtime
- Runtime agnostic — Bring your own async runtime via the
Runtimetrait (Tokio included by default)
For the full API reference and guides, see the documentation.
Quick Start
use Arc;
use Bot;
use SqliteStore;
use TokioRuntime;
use TokioWebSocketTransportFactory;
use UreqHttpClient;
use Event;
async
Run the included demo bot:
Project Structure
whatsapp-rust/
├── src/ # Main client library
├── wacore/ # Platform-agnostic core (no runtime deps)
│ ├── binary/ # WhatsApp binary protocol
│ ├── libsignal/ # Signal Protocol implementation
│ └── appstate/ # App state management
├── waproto/ # Protocol Buffers definitions
├── storages/sqlite-storage # SQLite backend
├── transports/tokio-transport
└── http_clients/ureq-client
Disclaimer
This is an unofficial, open-source reimplementation. Using custom WhatsApp clients may violate Meta's Terms of Service and could result in account suspension. Use at your own risk.