range-cache 0.1.0

A thread-safe sparse byte-range cache with optional async read-through
Documentation
[package]
name = "range-cache"
version = "0.1.0"
edition = "2024"
rust-version = "1.85"
authors = ["HelixDB, Inc. <hello@helix-db.com>"]
description = "A thread-safe sparse byte-range cache with optional async read-through"
license = "Apache-2.0"
repository = "https://github.com/HelixDB/range-cache"
homepage = "https://github.com/HelixDB/range-cache"
documentation = "https://docs.rs/range-cache"
readme = "README.md"
keywords = ["cache", "range", "bytes", "async", "storage"]
categories = ["caching", "data-structures", "asynchronous"]
exclude = [".github/"]

[features]
default = []
async = ["dep:async-trait", "dep:futures-util", "dep:tokio"]

[dependencies]
async-trait = { version = "0.1", optional = true }
bytes = "1"
futures-util = { version = "0.3", optional = true }
parking_lot = "0.12"
thiserror = "2"
tokio = { version = "1", features = ["sync"], optional = true }

[dev-dependencies]
criterion = { version = "0.5", features = ["async_tokio"] }
proptest = "1"
tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync", "time"] }

[lints.rust]
unsafe_code = "forbid"

[lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[[bench]]
name = "range_cache"
harness = false