[package] description = "Make retry like a built-in feature provided by Rust." documentation = "https://docs.rs/backon" name = "backon" readme = "../README.md" rust-version = "1.85" version = "1.6.0" edition.workspace = true license.workspace = true repository.workspace = true [package.metadata.docs.rs] all-features = true targets = [ "x86_64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-pc-windows-msvc", "wasm32-unknown-unknown", ] [features] default = ["std", "std-blocking-sleep", "tokio-sleep", "gloo-timers-sleep"] embassy-sleep = ["embassy-time"] futures-timer-sleep = ["futures-timer"] gloo-timers-sleep = ["gloo-timers/futures"] std = ["fastrand/std"] std-blocking-sleep = [] tokio-sleep = ["tokio/time"] [dependencies] embassy-time = { version = "0.5", optional = true } fastrand = { version = "2", default-features = false } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] futures-timer = { version = "3.0.3", optional = true } tokio = { version = "1", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] futures-timer = { version = "3.0.3", optional = true, features = [ "gloo-timers", ] } gloo-timers = { version = "0.3", optional = true } [dev-dependencies] anyhow = "1" reqwest = "0.12" spin = "0.10.0" [target.'cfg(target_arch = "wasm32")'.dev-dependencies] tokio = { version = "1", features = [ "macros", "rt", "sync", ], default-features = false } wasm-bindgen-test = "0.3" [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] sqlx = { version = "0.8.0", features = ["runtime-tokio", "sqlite"] } tokio = { version = "1", features = [ "time", "rt", "macros", "sync", "rt-multi-thread", ] }