# 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"
rust-version = "1.85"
name = "cachekit"
version = "0.6.0"
authors = ["Thomas Korrison <ferrite.db@gmail.com>"]
build = false
exclude = [
    "/.idea/",
    "/.DS_Store",
    "/**/.DS_Store",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High-performance cache primitives with pluggable eviction policies (LRU, LFU, FIFO, 2Q, Clock-PRO, S3-FIFO) and optional metrics."
homepage = "https://oxidizelabs.github.io/cachekit/"
readme = "README.md"
keywords = [
    "cache",
    "lru",
    "lfu",
    "eviction",
    "s3-fifo",
]
categories = [
    "caching",
    "data-structures",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/OxidizeLabs/cachekit"
resolver = "2"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]
targets = ["x86_64-unknown-linux-gnu"]

[features]
concurrency = ["parking_lot"]
default = [
    "policy-s3-fifo",
    "policy-lru",
    "policy-fast-lru",
    "policy-lru-k",
    "policy-clock",
]
metrics = []
policy-all = [
    "policy-fifo",
    "policy-lru",
    "policy-fast-lru",
    "policy-lru-k",
    "policy-lfu",
    "policy-heap-lfu",
    "policy-two-q",
    "policy-s3-fifo",
    "policy-arc",
    "policy-car",
    "policy-lifo",
    "policy-mfu",
    "policy-mru",
    "policy-random",
    "policy-slru",
    "policy-clock",
    "policy-clock-pro",
    "policy-nru",
]
policy-arc = []
policy-car = []
policy-clock = []
policy-clock-pro = []
policy-fast-lru = []
policy-fifo = []
policy-heap-lfu = []
policy-lfu = []
policy-lifo = []
policy-lru = []
policy-lru-k = []
policy-mfu = []
policy-mru = []
policy-nru = []
policy-random = []
policy-s3-fifo = []
policy-slru = []
policy-two-q = []
serde = ["dep:serde"]

[lib]
name = "cachekit"
crate-type = ["lib"]
path = "src/lib.rs"
test = true
doctest = true
bench = true
doc = true

[[example]]
name = "basic_builder"
path = "examples/basic_builder.rs"

[[example]]
name = "basic_fifo"
path = "examples/basic_fifo.rs"

[[example]]
name = "basic_heap_lfu"
path = "examples/basic_heap_lfu.rs"

[[example]]
name = "basic_lfu"
path = "examples/basic_lfu.rs"

[[example]]
name = "basic_lifo"
path = "examples/basic_lifo.rs"

[[example]]
name = "basic_lru"
path = "examples/basic_lru.rs"

[[example]]
name = "basic_lru_k"
path = "examples/basic_lru_k.rs"

[[example]]
name = "basic_mfu"
path = "examples/basic_mfu.rs"

[[example]]
name = "basic_mru"
path = "examples/basic_mru.rs"

[[example]]
name = "basic_nru"
path = "examples/basic_nru.rs"

[[example]]
name = "basic_random"
path = "examples/basic_random.rs"

[[example]]
name = "basic_s3_fifo"
path = "examples/basic_s3_fifo.rs"

[[example]]
name = "basic_slru"
path = "examples/basic_slru.rs"

[[example]]
name = "basic_two_q"
path = "examples/basic_two_q.rs"

[[example]]
name = "dhat_profile"
path = "examples/dhat_profile.rs"

[[test]]
name = "fifo_concurrency"
path = "tests/fifo_concurrency.rs"

[[test]]
name = "lfu_concurrency"
path = "tests/lfu_concurrency.rs"

[[test]]
name = "lru_concurrency"
path = "tests/lru_concurrency.rs"

[[test]]
name = "lru_integration_test"
path = "tests/lru_integration_test.rs"

[[test]]
name = "lru_k_concurrency"
path = "tests/lru_k_concurrency.rs"

[[test]]
name = "nru_concurrency"
path = "tests/nru_concurrency.rs"

[[test]]
name = "performance_regression"
path = "tests/performance_regression.rs"

[[test]]
name = "policy_invariants"
path = "tests/policy_invariants.rs"

[[test]]
name = "slab_concurrency"
path = "tests/slab_concurrency.rs"

[[bench]]
name = "comparison"
path = "benches/comparison.rs"
harness = false

[[bench]]
name = "ops"
path = "benches/ops.rs"
harness = false

[[bench]]
name = "policy_lfu"
path = "benches/policy/lfu.rs"
harness = false

[[bench]]
name = "policy_lru"
path = "benches/policy/lru.rs"
harness = false

[[bench]]
name = "policy_lru_k"
path = "benches/policy/lru_k.rs"
harness = false

[[bench]]
name = "policy_s3_fifo"
path = "benches/policy/s3_fifo.rs"
harness = false

[[bench]]
name = "reports"
path = "benches/reports.rs"
harness = false

[[bench]]
name = "runner"
path = "benches/runner.rs"
harness = false

[[bench]]
name = "workloads"
path = "benches/workloads.rs"
harness = false

[dependencies.parking_lot]
version = "0.12"
optional = true

[dependencies.rustc-hash]
version = "2.1"

[dependencies.serde]
version = "1"
features = ["derive"]
optional = true

[dev-dependencies.arbitrary]
version = "1.4"
features = ["derive"]

[dev-dependencies.chrono]
version = "0.4"

[dev-dependencies.criterion]
version = "0.8"

[dev-dependencies.dhat]
version = "0.3"

[dev-dependencies.lru]
version = "0.16"

[dev-dependencies.proptest]
version = "1.11"

[dev-dependencies.quick_cache]
version = "0.6"

[dev-dependencies.serde_json]
version = "1.0"

[profile.bench]
opt-level = 3
lto = "thin"
codegen-units = 1
debug = 0
debug-assertions = false
overflow-checks = false
strip = true

[profile.dev]
opt-level = 0
lto = false
codegen-units = 256
debug = 2
debug-assertions = true
panic = "unwind"
overflow-checks = true
incremental = true

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
debug = 0
debug-assertions = false
panic = "abort"
overflow-checks = false
strip = true

[profile.test]
opt-level = 1
lto = false
codegen-units = 256
debug = 2
debug-assertions = true
overflow-checks = true
incremental = true
