Library · Rust · no_std
reliakit
An 18-crate reliability toolkit for Rust - small, composable, clock-agnostic building blocks (rate limiting, concurrency limiting, circuit breakers, health checks, backoff, validated primitives, secrets) that run anywhere, including WASM. This very site is guarded by it.
Try it live in your browser
reliakit actually running in WASM. Mash the buttons.
Rate limiter
5 tokens, +1 every 2s. Spam it.
Circuit breaker
3 failures → Open (fail fast), 5s cooldown.
State: Closed
Backoff
100ms ×2, capped at 2s, max 8 retries.
#0 → wait 100ms
Bulkhead
4 concurrent slots. Spam past it → rejected.
0/4 in-flight
Secret redaction
Type a secret - it can't leak into logs.
log › -
Validated primitives
An email parsed into a type that can't hold an invalid value.
type an email…
Bounded JSON parse
Depth/size-capped - hostile JSON can't blow the stack.
✓ parsed (within limits)
Health aggregate
Toggle components - worst critical wins (200/503).
overall: Healthy → HTTP 200
Timeout / deadline
Start a 3s deadline, then Check it as real time passes.
press Start
The reliakit family
18 reliability crates I wrote. The tagged ones power this very site.
reliakit
Umbrella crate re-exporting the whole toolkit.
crates.io ↗reliakit-primitives
used on this siteType-safe primitives: Email, HttpUrl, NonEmptyStr, Port, Slug…
crates.io ↗reliakit-ratelimit
used on this siteClock-agnostic token-bucket rate limiter with retry-after.
crates.io ↗reliakit-circuit
used on this siteCircuit breaker for fault isolation and fast failure.
crates.io ↗reliakit-secret
used on this siteSecret-safe wrappers that never leak through logs.
crates.io ↗reliakit-backoff
Retry backoff policies (exponential, linear, constant) + jitter.
crates.io ↗reliakit-timeout
Clock-agnostic deadlines and timeouts for retries.
crates.io ↗reliakit-bulkhead
used on this siteConcurrency limiter (semaphore bulkhead) - caps this site's OG-image renders.
crates.io ↗reliakit-health
used on this siteCriticality-aware status aggregator - powers this site's /health endpoint.
crates.io ↗reliakit-collections
Bounded, reliability-oriented collection types.
crates.io ↗reliakit-validate
Composable validation traits and error types.
crates.io ↗reliakit-json
Strict, bounded, deterministic JSON. no_std + alloc.
crates.io ↗reliakit-codec
Deterministic canonical binary encoding & decoding.
crates.io ↗reliakit-core
Shared foundations: a clock-agnostic Clock trait.
crates.io ↗reliakit-derive
Derive macros for reliakit traits, std-only.
crates.io ↗reliakit-decide
Deterministic, zero-dependency decision engine.
crates.io ↗reliakit-csv
used on this siteStrict, deterministic CSV - powers this dashboard's subscriber export.
crates.io ↗reliakit-retry
used on this siteRuntime-agnostic retry helpers - retries this site's transient email sends.
crates.io ↗