[package]
edition = "2024"
name = "lightcycle"
version = "0.1.1"
authors = ["C J Silverio <ceejceej@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Consistent and rendezvous hash rings with optimized hash functions."
homepage = "https://github.com/ceejbot/lightcycle"
readme = "README.md"
license = "Parity-7.0.0"
repository = "https://github.com/ceejbot/lightcycle"
[features]
default = ["hash-murmur3"]
hash-blake3 = ["blake3"]
hash-metrohash = ["metrohash"]
hash-murmur3 = ["murmurs"]
hash-rapidhash = ["rapidhash"]
hash-xxhash = ["xxhash-rust"]
murmurs = ["dep:murmurs"]
[lib]
name = "lightcycle"
path = "src/lib.rs"
[[example]]
name = "load_balancer"
path = "examples/load_balancer.rs"
[[example]]
name = "redis_cache"
path = "examples/redis_cache.rs"
[[test]]
name = "algorithms"
path = "tests/algorithms.rs"
[[test]]
name = "distribution"
path = "tests/distribution.rs"
[[test]]
name = "integration"
path = "tests/integration.rs"
[dependencies.blake3]
version = "1.3.3"
optional = true
[dependencies.metrohash]
version = "1.0.7"
optional = true
[dependencies.murmurs]
version = "1.0.5"
optional = true
[dependencies.rapidhash]
version = "4.0.0"
optional = true
[dependencies.thiserror]
version = "2.0.16"
[dependencies.xxhash-rust]
version = "0.8"
features = ["xxh3"]
optional = true
[dev-dependencies.anyhow]
version = "1.0.99"
[dev-dependencies.kolmogorov_smirnov]
version = "1.1.0"
[dev-dependencies.redis]
version = "1.2.1"
[lints.clippy]
unwrap_used = "deny"
[lints.rust.future_incompatible]
level = "deny"
priority = 2
[lints.rust.rust_2018_idioms]
level = "warn"
priority = 4
[lints.rust.trivial_casts]
level = "warn"
priority = 3
[lints.rust.unsafe_code]
level = "deny"
priority = 1
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"
strip = true