[workspace]
members = [
  ".",
  "python",
  "crates/prunist",
]
resolver = "2"

[workspace.package]
version = "0.13.1"

[package]
name = "headson"
version.workspace = true
edition = "2024"
description = "Budget‑constrained JSON preview renderer"
readme = "README.md"
rust-version = "1.85.0"
license = "MIT"
repository = "https://github.com/kantord/headson"
homepage = "https://github.com/kantord/headson"
documentation = "https://docs.rs/headson"
keywords = ["json", "cli", "render", "preview"]
categories = ["command-line-utilities", "parsing"]
include = [
  "src/**",
  "Cargo.toml",
  "README.md",
  "docs/assets/**",
  "LICENSE*",
]

[dependencies]
anyhow = "1.0.100"
clap = { version = "4.5.49", features = ["derive"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.145"
unicode-segmentation = "1.12.0"
simd-json = { version = "0.17", features = ["serde_impl"] }
content_inspector = "0.2"
frecenfile = "0.4"
# We only read local git history; network features stay off to avoid OpenSSL/libssh2.
git2 = { version = "0.20.1", default-features = false, features = ["vendored-libgit2"] }
ignore = "0.4"
yaml-rust2 = "0.11"
once_cell = "1.19"
syntect = "5"
regex = "1.11"
clap_complete = "4.5.62"
prunist = { path = "crates/prunist", version = "0.13.1" }

 

[features]
default = []

[lib]
doctest = false

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

[dev-dependencies]
filetime = "0.2"
insta = "1.40.0"
assert_cmd = "2"
test_each_file = "0.3"
rand = "0.9"
rand_chacha = "0.9"
tempfile = "3"
serde_yaml = "0.9"

[profile.release]
# Prioritize runtime speed for large inputs
opt-level = 3
lto = "thin"
codegen-units = 1
panic = "abort"
strip = "symbols"
incremental = false

[workspace.metadata.dist]
cargo-dist-version = "0.30.2"
ci = "github"
installers = []
artifacts = ["executable"]
manifest-path = "Cargo.toml"
targets = [
  "x86_64-unknown-linux-gnu",
  "x86_64-unknown-linux-musl",
  "aarch64-unknown-linux-gnu",
  "aarch64-unknown-linux-musl",
  "x86_64-apple-darwin",
  "aarch64-apple-darwin",
  "x86_64-pc-windows-msvc",
  "aarch64-pc-windows-msvc",
]
signing = { cosign = true }

# The profile that 'dist' will build with
[profile.dist]
inherits = "release"
lto = "thin"

[lints.clippy]
cargo = { level = "deny", priority = -1 }
all = { level = "deny", priority = -1 }
perf = { level = "deny", priority = -1 }
cognitive_complexity = "deny"
too_many_lines = "deny"
too_many_arguments = "deny"
type_complexity = "deny"
bool_comparison = "deny"
branches_sharing_code = "deny"
match_same_arms = "deny"
if_same_then_else = "deny"
needless_return = "deny"
manual_map = "deny"
manual_flatten = "deny"
needless_borrow = "deny"
needless_borrowed_reference = "deny"
unnecessary_wraps = "deny"
option_as_ref_deref = "deny"
match_like_matches_macro = "deny"
needless_bool = "deny"
dbg_macro = "deny"
manual_let_else = "deny"
collapsible_if = "deny"
redundant_else = "deny"
needless_late_init = "deny"
ptr_arg = "deny"
trivially_copy_pass_by_ref = "deny"
string_add = "deny"
manual_strip = "deny"
manual_split_once = "deny"
range_plus_one = "deny"
panic_in_result_fn = "deny"
todo = "deny"
unimplemented = "deny"
allow_attributes_without_reason = "deny"
similar_names = "deny"
shadow_unrelated = "deny"
let_and_return = "deny"
single_match_else = "deny"
redundant_clone = "deny"
redundant_closure_for_method_calls = "deny"
manual_range_contains = "deny"
match_ref_pats = "deny"
needless_pass_by_value = "deny"
implicit_hasher = "deny"
uninlined_format_args = "deny"
float_cmp = "deny"
float_cmp_const = "deny"

[lints.rust]
dead_code = "warn"
