[package]
name = "bma-ts"
version = "0.2.6"
edition = "2024"
authors = ["Serhij S. <div@altertech.com>"]
license = "MIT"
repository = "https://github.com/alttch/bma-ts"
description = "Bohemia Automation time library"
readme = "README.md"
keywords = ["time", "date"]

[package.metadata.docs.rs]
features = ["full"]

[package.metadata.playground]
features = ["full"]

[dependencies]
chrono = { version = "0.4", optional = true }
dateparser = { version = "0.2", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
sqlx = { version = "0.8", optional = true, features = ["postgres", "sqlite"], default-features = false }
thiserror = "1.0"

[target.'cfg(unix)'.dependencies]
nix = { version = "0.27", features = ["time"] }

# For web assembly target
[target.'cfg(target_arch = "wasm32")'.dependencies]
web-time = "1.1"

[dev-dependencies]
serde_json = "1"

[features]
#default = [ "full" ]
chrono = ["dep:chrono", "dateparser"]
full = [ "chrono", "serde", "sqlx" ]
as-float-secs = []
serde = ["dep:serde"]
