[package]
name = "lastfm-client"
version = "4.0.2"
edition = "2024"
description = "A modern, async Rust library for fetching and analyzing Last.fm user data"
license = "MIT"
repository = "https://github.com/TomPlanche/lastfm-client"
keywords = ["lastfm", "api", "async", "music", "scrobble"]
categories = ["api-bindings", "web-programming"]

[features]
sqlite   = ["dep:rusqlite"]
progress = ["dep:indicatif"]
full     = ["sqlite", "progress"]

[dependencies]
async-trait = "0.1"
chrono = "0.4.43"
csv = "1.4.0"
dotenv = "0.15.0"
futures = "0.3.31"
parking_lot = "0.12"
reqwest = { version = "0.12.28", features = ["json"] }
indicatif = { version = "0.17", optional = true }
rusqlite  = { version = "0.31", features = ["bundled"], optional = true }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
thiserror = "1.0"
tokio = { version = "1.49.0", features = ["full"] }
tracing = "0.1"
url = { version = "2.5.8", features = ["serde"] }

[dev-dependencies]
tokio = { version = "1.49.0", features = ["full", "test-util", "rt-multi-thread"] }

[[example]]
name = "scrobbles_sqlite"
required-features = ["sqlite"]

[[example]]
name = "with_progress"
required-features = ["progress"]

[lints.rust]
dead_code                     = "deny"
missing_debug_implementations = "deny"
missing_docs                  = "warn"
unreachable_pub               = "deny"
unsafe_code                   = "forbid"
unused_imports                = "deny"
unused_variables              = "deny"

[lints.clippy]
# Lint groups (lower priority so individual overrides win)
correctness = { level = "deny", priority = -1 }
suspicious  = { level = "deny", priority = -1 }
complexity  = { level = "deny", priority = -1 }
perf        = { level = "deny", priority = -1 }
style       = { level = "deny", priority = -1 }
pedantic    = { level = "deny", priority = -1 }
nursery     = { level = "warn", priority = -1 }

# Library API stability (restriction group)
exhaustive_enums   = "warn"
exhaustive_structs = "warn"

# Allowed - noisy in a library where types naturally carry the crate prefix
module_name_repetitions = "allow"
redundant_pub_crate     = "allow"

# Panics / fallible ops
expect_used = "warn"
panic       = "warn"
todo        = "warn"
unwrap_used = "warn"
