resend-rs
The official Rust SDK for sending email through the Resend API.
Repository Health
Technical Analysis
resend-rs is the official Resend client for Rust. It wraps the Resend HTTP API behind a typed Resend client that sends transactional and marketing email, and exposes the wider Resend surface — batches, audiences, contacts, domains, and API keys — as ergonomic Rust methods.
The client offers both asynchronous and blocking send methods (the latter behind a blocking feature flag), built-in client-side rate limiting to stay within Resend’s limits, and configurable TLS backends. It is built on reqwest and serde internally and even supports WASM targets such as Cloudflare Workers.
What You Get
- A
Resendclient covering email sending plus batches, audiences, contacts, domains, and API keys - Both async and blocking send methods, selectable via the
blockingfeature - Built-in client-side rate limiting configurable through
RESEND_RATE_LIMIT - Selectable TLS backends (
native-tlsorrustls-tls) and WASM/Cloudflare Worker support - Environment-driven configuration (
RESEND_API_KEY,RESEND_BASE_URL) with aDefaultimpl
Common Use Cases
- Sending transactional email (verification, receipts, password resets) from a Rust backend
- Dispatching batches of emails in a single API call
- Managing audiences and contacts for marketing sends programmatically
- Running email delivery from edge/WASM runtimes like Cloudflare Workers
Under The Hood
Architecture - The crate exposes a central Resend client that groups the API into service modules (emails, batch, audiences, contacts, domains, api-keys), each mapping to Resend REST endpoints. Requests are serialized with serde and issued through a shared reqwest HTTP client, with an internal rate limiter throttling outbound calls to respect Resend’s per-second limits. Tech Stack - Rust with tokio for async, reqwest for HTTP, and serde/serde_json for (de)serialization; TLS is pluggable between native-tls and rustls, and the crate compiles to WASM for edge runtimes. Code Quality - The project is very actively developed and versioned frequently (0.28.0), ships an examples/ directory including a Cloudflare Worker sample, and mirrors the official Resend API surface with typed request/response structs. API Design - Setup is minimal — set RESEND_API_KEY and construct Resend::default(), or pass a key explicitly — and sends are a single .awaited method call. Feature flags (blocking, TLS choice) keep the dependency surface tailored, and the client mirrors Resend’s documented API so its guides transfer directly.