After building WhatsApp gateways in Node.js for years, I kept hitting the same walls: memory bloat per session, fragile reconnects, and deployments that needed a whole runtime. So I rewrote the entire thing in Rust. The result is Waxum — a WhatsApp REST API gateway that ships as a single native binary.

GitHub: imtaqin/waxum · Docs: waxum.imtaqin.id

Two providers, one API

Every session runs on either the multi-device protocol (pair via QR or 8-char code) or Meta's official WhatsApp Cloud API. Both share the same /messages/* routes and the same webhook events, so switching providers doesn't mean rewriting your integration.

What's inside

Waxum is production-grade: 230+ REST endpoints across 34 feature modules.

  • Messaging — text, media, stickers, location, contact cards, polls, reactions, forward/edit/revoke, reply with context, CTA-URL buttons, broadcast lists, chat state (typing/recording), read receipts, and full-text message search via SQLite FTS5.
  • Scheduling & bulk — send_at on all 34 send endpoints, plus a blast queue with pacing, dedup, retry and a dead-letter queue.
  • Voice & video calls — ring/accept/reject, text-to-speech calls (Edge TTS, 300+ voices), audio playback calls, peer recording to disk or S3, and a bidirectional media WebSocket for audio and H.264 video. The WA-proprietary MLOW codec is implemented in pure Rust.
  • Sessions — unlimited sessions in one process, auto-reconnect, fleet stats, bulk purge/disconnect, and export/import of a session between instances.
  • Groups, contacts, privacy — the whole surface: invite links, member management, is_on_whatsapp batch checks, block lists, privacy settings.
  • Webhooks — per-session URL + secret, HMAC-SHA256 signatures, event filter masks, a circuit breaker and a DLQ with replay.

Auth is JWT + Bearer, there's a Swagger UI, Prometheus metrics, and optional NATS JetStream for event streaming.

Why Rust

Node.js gateway, 20 sessions:  ~1.2 GB RAM, cold start ~8s
Waxum, 20 sessions:            ~90 MB RAM, cold start <1s

No runtime to install, no node_modules, no native rebuild pain. You download one binary, point it at SQLite/Postgres/MySQL, and it runs.

Quick taste

# create a session and get the QR
curl -X POST http://localhost:3000/sessions -H "Authorization: Bearer $TOKEN" -d '{"id":"main"}'
curl http://localhost:3000/sessions/main/qr --output qr.png

# send a message
curl -X POST http://localhost:3000/sessions/main/messages/text \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"to":"628123456789","text":"Hello from Waxum"}'

Ecosystem

Waxum has grown its own ecosystem: waxum-studio (visual drag-and-drop workflow builder), waxum-mcp (drive WhatsApp from AI agents over MCP), waxum-agent (voice-driven WhatsApp assistant built with Tauri), an SDK, and channel plugins for Hermes and OpenClaw.

If you need WhatsApp automation that survives production, give it a try — and the repo just passed 120 stars, which still feels surreal.