[package]
edition = "2024"
rust-version = "1.85"
name = "relentless"
version = "0.13.0"
build = false
exclude = [
".envrc",
".github/",
".pre-commit-config.yaml",
".prettierrc.yaml",
".releaserc.json",
".tool-versions",
".typos.toml",
"AGENTS.md",
"CLAUDE.md",
"CONTRIBUTING.md",
"commitlint.config.js",
"deny.toml",
"docs/",
"justfile",
"node_modules/",
"package-lock.json",
"package.json",
"public-api.txt",
"scripts/",
"shell.nix",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Composable retry policies for fallible operations and polling."
homepage = "https://docs.rs/relentless"
documentation = "https://docs.rs/relentless"
readme = "README.md"
keywords = [
"retry",
"backoff",
"polling",
"resilience",
"no-std",
]
categories = [
"asynchronous",
"no-std",
"rust-patterns",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/camercu/relentless"
[package.metadata.docs.rs]
all-features = true
[features]
alloc = []
default = ["std"]
embassy-sleep = ["dep:embassy-time"]
futures-timer-sleep = [
"dep:futures-timer",
"std",
]
gloo-timers-sleep = ["dep:gloo-timers"]
std = [
"alloc",
"embassy-time?/std",
]
test-util = ["std"]
tokio-sleep = [
"dep:tokio",
"std",
]
[lib]
name = "relentless"
path = "src/lib.rs"
[[example]]
name = "async-cancel"
path = "examples/async-cancel.rs"
required-features = ["tokio-sleep"]
[[example]]
name = "async-polling"
path = "examples/async-polling.rs"
required-features = ["tokio-sleep"]
[[example]]
name = "basic-retry"
path = "examples/basic-retry.rs"
[[example]]
name = "hooks-and-stats"
path = "examples/hooks-and-stats.rs"
[[example]]
name = "polling-terminal-failure"
path = "examples/polling-terminal-failure.rs"
[[example]]
name = "sync-cancel"
path = "examples/sync-cancel.rs"
required-features = ["std"]
[[example]]
name = "testing-with-virtual-clock"
path = "examples/testing-with-virtual-clock.rs"
required-features = ["test-util"]
[[test]]
name = "allocation"
path = "tests/allocation.rs"
[[test]]
name = "async_no_alloc"
path = "tests/async_no_alloc.rs"
[[test]]
name = "composition"
path = "tests/composition.rs"
[[test]]
name = "error"
path = "tests/error.rs"
[[test]]
name = "ext"
path = "tests/ext.rs"
[[test]]
name = "hooks"
path = "tests/hooks.rs"
[[test]]
name = "jitter"
path = "tests/jitter.rs"
[[test]]
name = "parity"
path = "tests/parity.rs"
[[test]]
name = "policy_async"
path = "tests/policy_async.rs"
[[test]]
name = "policy_sync"
path = "tests/policy_sync.rs"
[[test]]
name = "predicate"
path = "tests/predicate.rs"
[[test]]
name = "prelude"
path = "tests/prelude.rs"
[[test]]
name = "properties"
path = "tests/properties.rs"
[[test]]
name = "sleeper"
path = "tests/sleeper.rs"
[[test]]
name = "state"
path = "tests/state.rs"
[[test]]
name = "stats"
path = "tests/stats.rs"
[[test]]
name = "stop"
path = "tests/stop.rs"
[[test]]
name = "test_util"
path = "tests/test_util.rs"
[[test]]
name = "timeout_no_clock"
path = "tests/timeout_no_clock.rs"
[[test]]
name = "timing"
path = "tests/timing.rs"
[[test]]
name = "trait_impls"
path = "tests/trait_impls.rs"
[[test]]
name = "wait"
path = "tests/wait.rs"
[[bench]]
name = "retry_hot_paths"
path = "benches/retry_hot_paths.rs"
harness = false
[dependencies.embassy-time]
version = "0.3"
optional = true
default-features = false
[dependencies.futures-timer]
version = "3"
optional = true
[dependencies.pin-project-lite]
version = "0.2"
[dependencies.tokio]
version = "1"
features = ["time"]
optional = true
default-features = false
[dev-dependencies.proptest]
version = "1"
[dev-dependencies.reqwest]
version = "0.12"
features = ["blocking"]
[dev-dependencies.stats_alloc]
version = "0.1"
[dev-dependencies.tokio]
version = "1"
features = [
"macros",
"rt-multi-thread",
"signal",
]
[dev-dependencies.tokio-util]
version = "0.7"
features = ["rt"]
[target.'cfg(target_arch = "wasm32")'.dependencies.gloo-timers]
version = "0.3"
features = ["futures"]
optional = true
default-features = false
[lints.clippy]
cast_possible_truncation = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
items_after_statements = "allow"
[lints.clippy.pedantic]
level = "warn"
priority = -1