arch-toolkit 0.3.0

Complete Rust toolkit for Arch Linux package management
Documentation
[package]
name = "arch-toolkit"
version = "0.3.0"
edition = "2024"
rust-version = "1.91"
description = "Complete Rust toolkit for Arch Linux package management"
license = "MIT"
repository = "https://github.com/Firstp1ck/arch-toolkit"
keywords = ["archlinux", "aur", "pacman", "package-manager"]
categories = ["api-bindings", "command-line-utilities"]
include = [
    "src/**",
    "examples/**",
    "tests/**",
    "Cargo.toml",
    "Cargo.lock",
    "README.md",
    "CHANGELOG.md",
    "LICENSE",
]

[features]
default = ["aur"]
aur = ["dep:reqwest", "dep:tokio", "dep:scraper", "dep:chrono", "dep:rand", "dep:lru", "dep:async-trait"]
deps = []  # No additional dependencies for types only
index = ["dep:tokio", "dep:reqwest"]  # Async refresh and caller-client mirror discovery
install = ["deps"]  # Installation command building (uses deps types)
news = ["dep:reqwest", "dep:tokio", "dep:chrono"]  # Arch news RSS and security advisories
sandbox = ["deps"]  # Build-preflight dependency analysis (uses deps parsers)
fuzzy-search = ["dep:fuzzy-matcher"]  # Optional fuzzy matching for search
cache-disk = ["dep:dirs"]

[dependencies]
# Always included (minimal)
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "2.0"
tracing = "0.1"

# HTTP client (for aur feature)
reqwest = { version = "0.13", features = ["json"], optional = true }
tokio = { version = "1", features = ["rt", "time"], optional = true }

# HTML parsing (for aur comments)
scraper = { version = "0.25", optional = true }

# Date handling (for aur comments)
chrono = { version = "0.4", optional = true }

# Random number generation (for rate limiting jitter)
rand = { version = "0.9", optional = true }

# LRU cache (for cache feature)
lru = { version = "0.16", optional = true }

# Async trait support (for aur feature)
async-trait = { version = "0.1", optional = true }

# Directory utilities (for cache-disk feature)
dirs = { version = "5.0", optional = true }

# Fuzzy matching (for fuzzy-search feature)
fuzzy-matcher = { version = "0.3", optional = true }

[dev-dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
wiremock = "0.6"
tempfile = "3.10"

# Examples that use the AUR client directly and cannot compile without it
[[example]]
name = "aur_example"
required-features = ["aur"]

[[example]]
name = "env_config"
required-features = ["aur"]

[[example]]
name = "health_check"
required-features = ["aur"]

[[example]]
name = "mock_testing"
required-features = ["aur"]

[[example]]
name = "rich_error_context"
required-features = ["aur"]

[[example]]
name = "with_caching"
required-features = ["aur"]

# Integration tests that exercise the AUR caching layer
[[test]]
name = "cache_integration"
required-features = ["aur"]

[package.metadata.docs.rs]
all-features = true

[lints.clippy]
# Enable cognitive complexity lint to catch overly complex functions
cognitive_complexity = "warn"
pedantic = { level = "deny", priority = -1 }
nursery = { level = "deny", priority = -1 }
unwrap_used = "deny"
# Keep docs linting consistent with clippy naming
missing_docs_in_private_items = "warn"

[lints.rust]
missing_docs = "warn"
# Ignored tests run with:
# cargo test -- --ignored