# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "judicious"
version = "2026.6.4"
authors = [
    "Jonathan Gopel <jgopel@gmail.com>",
    "Tony Scimone <scimoneaj@gmail.com>",
]
build = false
include = [
    "src/**/*.rs",
    "/README.md",
    "/LICENSE",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A rate-limiting library that enforces a cooldown period after a resource has been used (return-time based)."
homepage = "https://github.com/jgopel/judicious"
readme = "README.md"
keywords = [
    "rate-limit",
    "cooldown",
    "concurrency",
]
categories = [
    "asynchronous",
    "rust-patterns",
]
license-file = "LICENSE"
repository = "https://github.com/jgopel/judicious"

[features]
tokio = ["dep:tokio"]

[lib]
name = "judicious"
path = "src/lib.rs"

[dependencies.chrono]
version = "0.4.45"

[dependencies.thiserror]
version = "2.0.18"

[dependencies.tokio]
version = "1.52.3"
features = ["time"]
optional = true

[dependencies.tracing]
version = "0.1.44"

[dev-dependencies.pretty_assertions]
version = "1.4.1"

[dev-dependencies.tokio]
version = "1.52.3"
features = [
    "rt-multi-thread",
    "macros",
    "time",
]

[lints.clippy]
absolute-paths = "allow"
arbitrary-source-item-ordering = "allow"
arithmetic-side-effects = "allow"
blanket-clippy-restriction-lints = "allow"
error-impl-error = "allow"
exhaustive-enums = "allow"
expect-used = "allow"
implicit-return = "allow"
missing-assert-message = "allow"
missing-docs-in-private-items = "allow"
missing-inline-in-public-items = "allow"
mod-module-files = "allow"
question-mark-used = "allow"
single-call-fn = "allow"
single-char-lifetime-names = "allow"
std-instead-of-alloc = "allow"
std-instead-of-core = "allow"
use-debug = "allow"

[lints.clippy.all]
level = "warn"
priority = -1

[lints.clippy.cargo]
level = "warn"
priority = -1

[lints.clippy.complexity]
level = "warn"
priority = -1

[lints.clippy.correctness]
level = "warn"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.clippy.perf]
level = "warn"
priority = -1

[lints.clippy.restriction]
level = "warn"
priority = -1

[lints.clippy.style]
level = "warn"
priority = -1

[lints.clippy.suspicious]
level = "warn"
priority = -1

[lints.rust]
missing_debug_implementations = "warn"
missing_docs = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unsafe_code = "warn"
unused_import_braces = "warn"
unused_qualifications = "warn"

[profile.perf]
debug = 2
inherits = "release"
strip = "none"

[profile.release]
lto = "fat"
codegen-units = 1
strip = "symbols"

[profile.release-with-asserts]
debug-assertions = true
inherits = "release"
