[package]
name = "lific"
version = "2.0.0"
edition = "2024"
description = "Local-first, lightweight issue tracker. Single binary, SQLite-backed, MCP-native."
license = "Apache-2.0"
repository = "https://github.com/VoidNullable/lific"
keywords = ["issue-tracker", "project-management", "mcp", "sqlite", "local-first"]
categories = ["command-line-utilities", "development-tools"]
rust-version = "1.88"
include = [
    "src/**/*",
    "migrations/**/*",
    "web/dist/**/*",
    "Cargo.toml",
    "LICENSE",
    "README.md",
]

[dependencies]
# HTTP
axum = { version = "0.8", features = ["json", "multipart"] }
tokio = { version = "1", features = ["full"] }
tower-http = { version = "0.6", features = ["cors", "compression-gzip", "compression-br"] }
# HTTP client — used by `lific doctor` to probe a running server (reachability,
# OAuth discovery, MCP round-trip). rustls-tls (no OpenSSL linkage) so the
# static single-binary build stays clean and `public_url` https checks work.
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "blocking"] }

# Database
rusqlite = { version = "0.32", features = ["bundled", "vtab", "backup"] }
crossbeam-queue = "0.3"

# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9"

# MCP
rmcp = { version = "1", features = ["server", "transport-io", "transport-streamable-http-server", "macros"] }
schemars = "0.8"
anyhow = "1"

# CLI
clap = { version = "4", features = ["derive", "env"] }
clap_complete = "4"

# Auth
api-keys-simplified = "0.5"
argon2 = "0.5"
rand = "0.8"
# Credential storage for `lific login` (LIF-258). On Linux we use the
# Secret Service backend (sync-secret-service) with the pure-Rust crypto
# session (crypto-rust, no OpenSSL) and `vendored` so libdbus is compiled in
# statically — CI and headless boxes don't need a system libdbus/pkg-config
# package. apple-native / windows-native cover macOS Keychain and Windows
# Credential Manager. When no Secret Service is present at runtime (e.g. a
# headless server), src/cli/credentials.rs falls back to a 0600
# ~/.config/lific/credentials.json file with a loud warning.
keyring = { version = "3", features = [
    "apple-native",
    "windows-native",
    "sync-secret-service",
    "crypto-rust",
    "vendored",
] }

# Static assets (embedded frontend)
rust-embed = { version = "8", features = ["mime-guess"] }
mime_guess = "2"
zip = { version = "2", default-features = false, features = ["deflate"] }
# Backup/restore archive format (LIF-266): `lific dump` / `lific restore`
# produce a single self-contained tar.gz (gitea-dump style). flate2 is already
# in the tree transitively; tar is the new direct dep.
tar = "0.4"
flate2 = "1"

# Encoding
urlencoding = "2"
# serde_urlencoded: parse application/x-www-form-urlencoded device-authorization
# bodies by hand (the endpoint accepts BOTH form and JSON, so we sniff the
# content-type and deserialize the raw bytes rather than committing to one axum
# extractor). Already in the tree transitively via axum.
serde_urlencoded = "0.7"

# Config
toml = "0.8"
# toml_edit: format-preserving TOML round-trip for `lific connect` writing into
# Codex's config.toml — inserting only [mcp_servers.lific] while keeping the
# user's existing keys, comments, and layout intact.
toml_edit = "0.22"
dirs = "6"

# Utilities
chrono = { version = "0.4", features = ["serde"] }
sha2 = "0.10"
base64 = "0.22"
thiserror = "2"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
hmac = { version = "0.12", features = ["std"] }
cliclack = "0.5.4"
console = "0.16.4"

# SIGPIPE handling for piped CLI output (see main.rs); unix only.
[target.'cfg(unix)'.dependencies]
libc = "0.2"

[dev-dependencies]
tower = { version = "0.5", features = ["util"] }
http-body-util = "0.1"

# Argon2 password hashing is memory-hard by design; in unoptimized debug
# builds each hash/verify costs ~0.4s of CPU, and the test suite performs
# hundreds of them (every API test that creates a user or logs in). Compiling
# just the crypto crates with optimizations keeps `cargo test` fast without
# touching hash parameters or test code. Measured: full suite CPU time
# dropped from ~42 CPU-minutes to a fraction with this override.
[profile.dev.package.argon2]
opt-level = 3
[profile.dev.package.blake2]
opt-level = 3

[profile.release]
opt-level = 3
strip = true

# For distribution builds (AUR, GitHub releases):
# cargo build --profile release-dist
[profile.release-dist]
inherits = "release"
lto = true
codegen-units = 1
