[package]
name = "nu-analytics"
version = "0.5.1"
edition = "2021"
authors = ["Albert Lionelle <a.lionelle@northeastern.edu>"]
description = "A CLI tool for computing Curricular Analytics metrics. Based off metrics from CurricularAnalytics.org. Currently, only basic metrics and additional reporting features."
license = "MIT"
repository = "https://github.com/NeuCurricularAnalytics/NuAnalytics"
keywords = ["curricular-analytics", "curriculum", "research", "cli", "metrics"]
readme = "Readme.md"
categories = ["command-line-utilities", "science"]

[lib]
name = "nu_analytics"
path = "src/lib.rs"
crate-type = ["rlib"]

# CLI binary (default)
[[bin]]
name = "nuanalytics"
path = "src/cli/main.rs"

[dependencies]
clap = { version = "4.5", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9"
serde_json = "1.0"
toml = "1.1"
dirs = "6.0"
fastrand = "2.0"
chrono = "0.4"

# MCP server dependencies (optional feature)
rmcp = { version = "1.0.0-alpha", features = ["server", "transport-io"], optional = true }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-std", "fs", "net", "io-util", "time"], optional = true }

# Database dependencies (optional feature)
supabase-client-sdk = { version = "0.2", features = ["auth"], optional = true }
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false, optional = true }
csv = { version = "1.3", optional = true }
zip = { version = "8", optional = true }
form_urlencoded = { version = "1.2", optional = true }
sha2 = { version = "0.10", optional = true }

[dev-dependencies]
tempfile = "3.10"
criterion = "0.5"

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

# No WASM target dependencies; CLI-only

[features]
default = ["log-info", "log-debug", "verbose", "file-logging", "database", "mcp"]
log-info = []
log-debug = []
verbose = []
file-logging = []
database = ["dep:supabase-client-sdk", "dep:reqwest", "dep:csv", "dep:zip", "dep:tokio", "dep:form_urlencoded", "dep:sha2"]
mcp = ["dep:rmcp", "dep:tokio", "database"]

[profile.release]
opt-level = "z"  # Optimize for size
lto = true        # Enable Link Time Optimization

# Linting configuration
[lints.rust]
unsafe_code = "warn"
missing_docs = "warn"

[lints.clippy]
all = "warn"
pedantic = "warn"
nursery = "warn"
correctness = "deny"
perf = "deny"

# Match CI's `cargo doc` strictness so doc-only failures surface locally.
[lints.rustdoc]
broken_intra_doc_links = "deny"
invalid_html_tags = "deny"
unescaped_backticks = "warn"

# Note: logger is now an internal module; no workspace members required.
