smskit β Universal MultiβProvider SMS Toolkit for Rust π
Status: v0.2.0 (beta) β Complete framework-agnostic SMS abstraction with support for every major Rust web framework.
π― Why smskit?
Give your users the freedom to bring their own SMS provider while you code to a single, unified interface. Switch between Plivo, Twilio, AWS SNS, or any provider without changing your application code.
π₯ NEW in v0.2.0: Universal web framework support! Works with Axum, Warp, Actix-web, Rocket, Tide, Hyper, or ANY framework you can imagine.
π¦ Architecture
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββββββ
β Your App β β sms-core β β SMS Providers β
β ββββββ (traits & types)ββββββ β’ Plivo β
β β’ Business Logicβ β β β β’ Twilio (soon) β
β β’ Web Routes β ββββββββββββββββββββ β β’ AWS SNS (soon) β
βββββββββββββββββββ β βββββββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββ ββββββββββββββββββββ
β Web Framework β β sms-web-generic β
β Adapters ββββββ (core logic) β
β β’ Axum β β β
β β’ Warp β β Framework- β
β β’ Actix-web β β agnostic β
β β’ Rocket β β processing β
β β’ Tide β β β
β β’ Hyper β β β
β β’ + ANY other β β β
βββββββββββββββββββ ββββββββββββββββββββ
π Quick Start
Option 1: Use Your Favorite Framework
[]
= "0.2"
= "0.2"
= "0.2"
= "0.7"
= { = "1.0", = ["full"] }
use Arc;
use ;
use InboundRegistry;
use PlivoClient;
use ;
async
Option 2: Framework-Agnostic Integration π₯
Works with ANY web framework - just adapt the request/response types:
use WebhookProcessor;
// This works with ANY web framework!
async
π Supported Frameworks
| Framework | Crate | Status | Example |
|---|---|---|---|
| Axum | sms-web-axum |
β Complete | Example |
| Warp | sms-web-warp |
β Complete | Example |
| Actix-web | sms-web-actix |
β Complete | Example |
| Rocket | sms-web-rocket |
β Complete | Example |
| Tide | sms-web-tide |
β Complete | Example |
| Hyper | sms-web-hyper |
β Complete | Example |
| Generic | sms-web-generic |
β Complete | DIY Integration |
| Your Framework | DIY | β Supported | Use sms-web-generic! |
π SMS Providers
| Provider | Crate | Send SMS | Webhooks | Status |
|---|---|---|---|---|
| Plivo | sms-plivo |
β | β | Complete |
| Twilio | sms-twilio |
π | π | Coming Soon |
| AWS SNS | sms-aws-sns |
π | π | Coming Soon |
π‘ Usage Examples
Sending SMS
use ;
use PlivoClient;
let client = new;
let response = client.send.await?;
println!;
Receiving SMS (Webhooks)
All frameworks receive the same normalized InboundMessage:
Webhook URLs:
- POST
http://yourserver.com/webhooks/plivo - POST
http://yourserver.com/webhooks/twilio - POST
http://yourserver.com/webhooks/{any_provider}
πββοΈ Running Examples
# Test the generic integration (works everywhere!)
# Try with specific frameworks
# Original Axum example