reliakit
The umbrella crate for the Reliakit reliability toolkit: one name that
re-exports the individual reliakit-* building blocks behind feature flags.
This crate contains no logic of its own. It exists so you can depend on a single
name and turn on only the pieces you need. Nothing is pulled in by default beyond
the std flag — each module appears only when its feature is enabled, so the
zero-dependency, no_std-friendly nature of each building block is preserved.
What This Crate Does
- Gives the toolkit one import name instead of a dozen.
- Re-exports each building block as a module:
reliakit::ratelimit,reliakit::secret,reliakit::circuit, and so on. - Forwards
std/allocto whichever sub-crates you enable, sono_stdworks through the umbrella exactly as it does for the individual crates.
When To Use It
- You want several Reliakit building blocks and prefer one dependency line and one version to track.
- You are exploring the toolkit and want everything reachable under one name
(
features = ["full"]).
When Not To Use It
- You need exactly one building block and want the tightest possible dependency
graph — depend on that crate directly (e.g.
reliakit-ratelimit). The umbrella adds no capability, only convenience.
Installation
Enable only the building blocks you need:
[]
= { = "0.1", = ["ratelimit", "secret"] }
use RateLimiter;
use Secret;
no_std with alloc:
[]
= { = "0.1", = false, = ["alloc", "primitives"] }
Everything at once:
[]
= { = "0.1", = ["full"] }
Building Blocks
| Feature | Module | Crate |
|---|---|---|
core |
reliakit::core |
reliakit-core — Clock trait + clocks |
primitives |
reliakit::primitives |
reliakit-primitives — validated primitive types |
secret |
reliakit::secret |
reliakit-secret — secret redaction wrappers |
validate |
reliakit::validate |
reliakit-validate — validation traits + error aggregation |
collections |
reliakit::collections |
reliakit-collections — bounded collections |
codec |
reliakit::codec |
reliakit-codec — canonical binary encoding |
backoff |
reliakit::backoff |
reliakit-backoff — retry backoff policies |
circuit |
reliakit::circuit |
reliakit-circuit — circuit breaker |
ratelimit |
reliakit::ratelimit |
reliakit-ratelimit — token-bucket rate limiter |
timeout |
reliakit::timeout |
reliakit-timeout — deadlines and timeouts |
json |
reliakit::json |
reliakit-json — strict, bounded JSON |
derive |
reliakit::derive |
reliakit-derive — derive macros |
decide |
reliakit::decide |
reliakit-decide — utility decision engine |
Feature Flags
| Feature | Default | Effect |
|---|---|---|
std |
yes | Implies alloc; forwards std to enabled crates. |
alloc |
via std |
Forwards alloc to enabled crates that need owned storage. |
core |
no | Adds reliakit::core and enables the clock-aware *_now methods of any enabled resilience crate. |
<crate> |
no | Adds that crate's module (see table above). |
full |
no | Enables every building block. |
json-canonical |
no | Enables reliakit-json's RFC 8785 canonical serialization. |
json-primitives |
no | Typed JSON extraction into reliakit-primitives. |
json-validate |
no | Accumulating JSON field validation into reliakit-validate. |
codec-primitives |
no | Canonical codec impls for reliakit-primitives types. |
no_std
no_std-compatible (default-features = false). Enable the umbrella's alloc
feature for the modules whose owned storage is gated behind it — primitives,
secret, validate, collections, and codec. json and decide always
include alloc on their own, so they need no extra feature. The pure-core
blocks (backoff, circuit, ratelimit, timeout) need neither std nor
alloc.
Safety
#![forbid(unsafe_code)]. The umbrella adds no code beyond re-exports; each
building block forbids unsafe code in its own right.
Minimum Supported Rust Version
Rust 1.85 and newer. No nightly features are used.
Status
Pre-1.0. A thin re-export layer over the reliakit-* building blocks; its public
surface is the set of feature flags, which may gain backward-compatible additions
before a 1.0 release.
License
Licensed under the MIT License. See LICENSE.