
retryx
Small, async-first retry & backoff helper for Tokio-based Rust services. A tiny, fluent builder API with no macros, no unsafe, and no hidden behavior.
I built retryx because most retry libraries in Rust either come with too much policy surface area or hide behavior behind macros. I wanted something tiny, explicit, and async-first—where you can see and control every retry, delay, and timeout in one fluent builder call.
retryx wraps any async operation that returns Result<T, E> and retries it with fixed or exponential backoff. It includes per-attempt timeouts, custom retry filters, and an on_retry hook for logging or metrics—all without macros or unsafe code.
What Makes It Different
- Async-first design built for Tokio and async/await
- No macros, no unsafe—simple, readable implementation
- No global state, no background tasks—runs in caller's async context
- Fluent builder API—configure retries, delays, timeouts, and filters in one chain
- Custom retry filters—decide which errors are retryable
- Per-attempt timeouts—wraps each attempt in
tokio::time::timeout
Built & Shipped
Pure Rust crate with zero dependencies beyond Tokio. Guarantees no panics, no global state, no background tasks. Available on crates.io with full documentation and examples.