dravr-canot
Unified multi-platform messaging library for WhatsApp, Slack, Discord, Telegram, and Messenger.
Overview
dravr-canot provides a trait-based architecture for routing conversations through external chat platforms. Each channel implements two core traits:
TransportAdapter— webhook signature verification, payload parsing, raw HTTP sendResponseRenderer— formatOutgoingMessageinto channel-specific payloads (Block Kit, Embeds, etc.)
Integration Modes
- Programmatic — use the
MessagingChanneltrait directly in your Rust code - REST Server — run
dravr-canot-serveras a standalone API server with webhook endpoints - MCP Server — run
dravr-canot-mcpto expose channels via Model Context Protocol (stdio or HTTP/SSE)
Install
Homebrew
Cargo
Docker
Library Usage
Add to your Cargo.toml:
[]
= { = "0.1", = ["channel-slack", "channel-whatsapp"] }
Feature Flags
| Feature | Channel |
|---|---|
channel-whatsapp |
WhatsApp Business Cloud API |
channel-messenger |
Meta Messenger Platform |
channel-discord |
Discord Bot API |
channel-slack |
Slack Events API |
channel-telegram |
Telegram Bot API |
all-channels |
All of the above |
Example
use ;
use create_adapter_from_config;
use json;
use Uuid;
let config = json!;
let adapter = create_adapter_from_config.unwrap;
let msg = OutgoingMessage ;
// Render to Slack Block Kit JSON
let payload = adapter.render.unwrap;
Architecture
dravr-canot (core library)
├── src/channel.rs — MessagingChannel trait
├── src/transport.rs — TransportAdapter trait
├── src/renderer.rs — ResponseRenderer trait
├── src/channels/ — Per-channel implementations
│ ├── slack/
│ ├── discord/
│ ├── whatsapp/
│ ├── messenger/
│ └── telegram/
├── src/registry.rs — ChannelRegistry for routing
└── src/factory.rs — Adapter factory from JSON config
dravr-canot-mcp — MCP server (stdio + HTTP/SSE)
dravr-canot-server — REST API + MCP unified server
Workspace Crates
| Crate | Description |
|---|---|
dravr-canot |
Core library with traits and channel adapters |
dravr-canot-mcp |
MCP server exposing channels via Model Context Protocol |
dravr-canot-server |
Unified REST API + MCP server binary |
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.