[package]
build = "build/mod.rs"
description = "A tool for managing git hooks"
documentation = "https://hk.jdx.dev"
edition = "2024"
homepage = "https://hk.jdx.dev"
include = [
  "/src/**/*",
  "/Cargo.toml",
  "/Cargo.lock",
  "/README.md",
  "/LICENSE",
  "/CHANGELOG.md",
  "/pkl",
  "/build/**/*",
  "/settings.toml",
]
license = "MIT"
name = "hk"
repository = "https://github.com/jdx/hk"
resolver = "3"
rust-version = "1.88.0"
version = "1.55.0"

[[bin]]
name = "generate-docs"
path = "bin/generate_docs.rs"

[dependencies]
arc-swap           = "1"
chrono             = "0.4"
clap               = { version = "4", features = ["derive"] }
clap_usage         = "5"
clx                = "3"
console            = "0.16"
dashmap            = "6"
demand             = "2"
dirs               = "6"
ensembler          = "1"
expr-lang          = { version = "1", features = ["serde"] }
eyre               = "0.6"
git2               = { version = "0.21", features = ["vendored-libgit2"] }
globset            = "0.4"
ignore             = "0.4"
indexmap           = { version = "2", features = ["serde"] }
infer              = "0.22"
is_ci              = "1"
itertools          = "0.15"
libc               = "0.2"
log                = "0.4"
memchr             = "2"
once_cell          = "1"
pklr               = "1"
regex              = "1"
rmcp               = { version = "3.1.2", features = ["transport-io"] }
schemars           = "1"
semver             = "1"
serde              = { version = "1", features = ["derive"] }
serde_json         = { version = "1", features = ["preserve_order"] }
serde_with         = "3"
serde_yaml         = "0.9"
shell-quote        = "0.7"
shell-words        = "1"
similar            = "3"
siphasher          = "1"
strum              = { version = "0.28", features = ["derive"] }
tempfile           = "3"
tera               = "2"
thiserror          = "2"
tokio              = { version = "1", features = ["io-util", "process", "rt-multi-thread", "signal", "sync", "time"] }
tokio-util         = "0.7"
toml               = "1"
tracing            = "0.1"
tracing-error      = "0.2"
tracing-log        = "0.2"
tracing-serde      = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json", "fmt"] }
url                = "2"
xx                 = { version = "2", features = ["hash"] }

[build-dependencies]
codegen    = "0.3"
indexmap   = { version = "2", features = ["serde"] }
serde      = { version = "1", features = ["derive"] }
serde_json = "1"
toml       = "1"

[dev-dependencies]
clap-sort = "1"

[profile.serious]
inherits = "release"
lto      = true
panic    = "abort"
strip    = true

# BOLT needs the linked symbol table and relocations while it rewrites the
# executable. The PGO+BOLT pipeline strips the final artifact after rewriting.
[profile.serious-pgo]
codegen-units = 1
inherits      = "serious"
strip         = "debuginfo"

[package.metadata.release]
pre-release-hook = ["mise", "run", "pre-release", "--version", "{{version}}"]
pre-release-replacements = [
  { file = "pkl/Config.pkl", search = '(min_hk_version[^=]*= )".*"', replace = '${1}"{{version | truncate(length=1)}}.0.0"' },
]

[profile.dev]
debug = 1
