[package]
name = "qtty-core"
description = "Core types for zero-cost strongly-typed physical quantities."
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"
documentation = "https://docs.rs/qtty-core"

[features]
default = ["std", "cross-unit-ops"]
std = []
cross-unit-ops = []
serde = ["dep:serde"]

# Unit-family features (opt-in for rare/domain-specific units)
astro = ["julian-time"]
navigation = []
fundamental-physics = []
customary = []
land-area = []
julian-time = []
radiometry = ["fundamental-physics"]
photometry = []
frequency = []
chemistry = []
electrical = []
density = []
all-units = ["astro", "navigation", "fundamental-physics", "customary", "land-area", "radiometry", "photometry", "frequency", "chemistry", "electrical", "density"]

# Optional support
scalar-rational = ["num-rational"]
pyo3 = ["dep:pyo3"]
tiberius = ["dep:tiberius"]
diesel = ["dep:diesel"]

[dependencies]
num-rational = { version = "0.4", optional = true, default-features = false }
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"], optional = true }
pyo3 = { version = "0.28.2", optional = true, features = ["auto-initialize"] }
tiberius = { version = "0.12", default-features = false, optional = true }
diesel = { version = "2.1", default-features = false, optional = true }
libm = "0.2"
typenum = "1.17"
qtty-derive = { version = "0.8.3", path = "../qtty-derive" }

[dev-dependencies]
approx = "0.5"
proptest = "1.4"
serde_json = "1.0"
trybuild = "1.0"
