[package]
name = "qtty"
description = "Strongly typed physical and astronomical 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"

[features]
default = ["std", "cross-unit-ops"]
alloc = []
std = ["alloc", "qtty-core/std"]
cross-unit-ops = ["qtty-core/cross-unit-ops"]
serde = ["qtty-core/serde"]

# Unit-family feature gates (forwarded to qtty-core)
astro = ["qtty-core/astro"]
navigation = ["qtty-core/navigation"]
fundamental-physics = ["qtty-core/fundamental-physics"]
customary = ["qtty-core/customary"]
land-area = ["qtty-core/land-area"]
julian-time = ["qtty-core/julian-time"]
all-units = ["astro", "navigation", "fundamental-physics", "customary", "land-area", "julian-time"]

# Scalar type support
scalar-rational = ["qtty-core/scalar-rational"]
pyo3 = ["qtty-core/pyo3", "dep:pyo3"]
tiberius = ["qtty-core/tiberius"]
diesel = ["qtty-core/diesel"]

[dependencies]
qtty-core = { version = "0.6.1", path = "../qtty-core", default-features = false }
qtty-derive = { version = "0.6.1", path = "../qtty-derive" }
pyo3 = { version = "0.28.2", optional = true, features = ["auto-initialize"] }

[dev-dependencies]
approx = "0.5"
proptest = "1.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

[[example]]
name = "python_integration"
required-features = ["pyo3"]

[[example]]
name = "all_units"
required-features = ["std", "all-units"]

[[example]]
name = "astronomy"
required-features = ["std", "astro"]

[[example]]
name = "angles"
required-features = ["std", "astro"]
