keelrun
The Rust front end for Keel — resilience
(retry/backoff/timeout/breaker/rate/cache) as a library, policy in one
keel.toml, no service to run.
Rust has no import hooks to hang a zero-code-change promise off of, so this
crate keeps the smallest possible ceiling instead: one attribute macro, plus
a reqwest-middleware adapter for outbound HTTP.
Install
Published on crates.io as keelrun (plain keel is taken). Add it with an
explicit rename so #[keel::wrap] resolves — this is the intended way to
add it, mirroring how this project's own crates already depend on
keelrun-core as keel-core:
which is equivalent to adding this to Cargo.toml by hand:
[]
= { = "keelrun", = "0.1" }
Quickstart
# use Error;
#
#
# ;
async
#
# ;
async
Outbound HTTP via reqwest:
# async
#[keel::wrap]'s v1 scope: a free (no self) async fn returning
Result<T, E> where T: Serialize + DeserializeOwned and
E: std::error::Error + Send + Sync + 'static; every parameter must
implement Clone (a retried call re-invokes the body, cloning fresh
arguments per attempt); the target string is explicit only, no signature
inference. KeelMiddleware's v1 scope: exact-host targets only (no
host:/URL-pattern globs), no response caching, add it last in the
ClientBuilder chain. Both documented in full in each type's own rustdoc.
Learn more
- Root README — what Keel is, the two-tier resilience/durability model, demos.
docs/dx-spec.md/docs/architecture-spec.md— the full design.- The
keelCLI (doctor/init/status/mcp/…) is a separate package,keelrun-cli— it does not yet scan Rust projects (crates/keel/src/lib.rs's crate docs track this as known debt).
Licensed under Apache-2.0.