[package]
name = "aprender-quant"
version.workspace = true
edition = "2021"
description = "K-quantization formats (Q4_K, Q5_K, Q6_K) for GGUF/APR model weights"
license = "MIT OR Apache-2.0"
repository = "https://github.com/paiml/trueno"
keywords = ["quantization", "gguf", "llm", "machine-learning", "neural-network"]
categories = ["science", "algorithms", "compression"]
authors = ["Trueno Engineering"]

[lib]
name = "trueno_quant"

[dependencies]
half = "2.4"

[lints.rust]
unsafe_op_in_unsafe_fn = "warn"
missing_docs = "warn"
rust_2018_idioms = "warn"

[lints.clippy]
# Inherit workspace policy
correctness = { level = "deny", priority = -1 }
suspicious = { level = "warn", priority = -1 }
perf = { level = "warn", priority = -1 }
complexity = { level = "warn", priority = -1 }
style = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
unwrap_used = "warn"
expect_used = "warn"
panic = "warn"
unreachable = "warn"
uninlined_format_args = "allow"
useless_vec = "allow"
unnecessary_unwrap = "allow"
# Quantization inherently requires lossy casts between numeric types
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_sign_loss = "allow"
# Similar variable names are conventional in quantization (e.g., ql, qh, qs)
similar_names = "allow"
# Pass-by-ref for consistency with trait signatures
trivially_copy_pass_by_ref = "allow"
# Bit manipulation loops index into multiple slices simultaneously
needless_range_loop = "allow"
