[package]
name = "goto-cli"
version = "0.1.0"
edition = "2021"
description = "Quickly navigate to projects with semantic search"
authors = ["sderosiaux"]
license = "MIT"
repository = "https://github.com/sderosiaux/goto"
homepage = "https://github.com/sderosiaux/goto"
keywords = ["cli", "navigation", "search", "productivity", "fuzzy"]
categories = ["command-line-utilities", "development-tools"]
readme = "README.md"
exclude = [".github", "hooks", "*.toml", "!Cargo.toml"]

[[bin]]
name = "goto"
path = "src/main.rs"

[dependencies]
# CLI
clap = { version = "4.5", features = ["derive"] }

# Database
rusqlite = { version = "0.32", features = ["bundled"] }  # pinned: sqlite-vec requires ^0.31

# Vector search (sqlite-vec extension)
sqlite-vec = "0.1"
zerocopy = { version = "0.7", features = ["derive"] }  # pinned: 0.8+ has breaking changes

# Embeddings (ONNX-based, offline)
fastembed = "5.8"

# Serialization
serde = { version = "1", features = ["derive"] }
toml = "0.8"  # pinned: 0.9+ has breaking API changes

# File system
walkdir = "2.5"
directories = "6"
dirs = "6"

# Regex (lightweight)
regex-lite = "0.1"

# Error handling
anyhow = "1"
thiserror = "2"

# Time
chrono = { version = "0.4", features = ["serde"] }

[lints.rust]
unused_must_use = "deny"

[lints.clippy]
pedantic = { level = "warn", priority = -1 }
# Intentional: score values, row counts, rank indices — precision loss is acceptable
cast_precision_loss = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
# CLI tool, not a published library
must_use_candidate = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
# PathBuf args come from clap (owned), passing by value is correct at the CLI boundary
needless_pass_by_value = "allow"
# Short names are idiomatic in Rust (tx, db, e, m, ...)
similar_names = "allow"
# Doc comment backticks
doc_markdown = "allow"
# Function size — acceptable for the CLI dispatcher
too_many_lines = "allow"

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