[package]
name = "pgmon"
version = "0.7.1"
edition = "2024"
authors = ["Nicolas Embriz <nbari@tequila.io>"]
description = "A PostgreSQL monitoring TUI"
license = "BSD-3-Clause"
readme = "README.md"
repository = "https://github.com/nbari/pgmon"
keywords = ["postgresql", "monitoring", "tui", "database"]
categories = ["command-line-utilities", "database"]

[lints.rust]
warnings = "deny"

[lints.clippy]
# Allow unstable/opinionated lints (lower priority so individual lints can override)
nursery = { level = "allow", priority = -1 }

# Enforce pedantic lints
pedantic = "deny"

# Core lint groups
all = "deny"
correctness = "deny"
suspicious = "deny"
perf = "deny"
complexity = "deny"

# Safety-critical lints
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
indexing_slicing = "deny"
await_holding_lock = "deny"

# Performance + memory reliability
needless_borrow = "deny"
needless_collect = "deny"
large_stack_arrays = "deny"

[dependencies]
anyhow = "1.0"
clap = { version = "4.6", features = ["color", "env", "string"] }
chrono = "0.4"
crossterm = { version = "0.29", features = ["events"] }
pg_query = "6.1.1"
ratatui = "0.30"
sqlx = { version = "0.9", default-features = false, features = ["runtime-tokio", "postgres", "chrono"] }
thiserror = "2.0"
tokio = { version = "1", features = ["rt-multi-thread", "sync", "time"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
unicode-width = "0.2"
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9"
dirs = "6.0"
csv = "1.4"
serde_json = "1.0"
url = "2.5"

[package.metadata.generate-rpm]
assets = [
    { source = "target/release/pgmon", dest = "/usr/local/bin/pgmon", mode = "0755" },
]

[package.metadata.deb]
assets = [
    ["target/release/pgmon", "/usr/local/bin/pgmon", "755"],
]
depends = ""


[build-dependencies]
built = { version = "0.8", features = ["git2"] }

[dev-dependencies]
pretty_assertions = "1.4"

[profile.release]
lto = "fat"
codegen-units = 1
strip = "symbols"
