[package]
name = "clock-kit"
version = "0.1.0"
edition = "2021"
rust-version = "1.85"
description = "Time-source abstraction for Rust — monotonic/wall separation, TSC calibration, PTP quality detection, deterministic test clock"
license = "MIT OR Apache-2.0"
repository = "https://github.com/WyattAu/clock-kit"
keywords = ["clock", "time", "latency", "ptp", "no-std"]
categories = ["date-and-time", "no-std", "development-tools::profiling"]
exclude = [".github/", "benches/"]
[features]
default = ["std"]
std = ["critical-section/std"]
libc = ["dep:libc"]
tsc = []
ptp = ["dep:libc", "std"]
chronoshift = ["dep:chronoshift"]
[dependencies]
libc = { version = "0.2", default-features = false, optional = true }
chronoshift = { version = "1.0", default-features = false, optional = true }
[target.'cfg(not(target_has_atomic = "64"))'.dependencies]
critical-section = { version = "1", default-features = false, features = ["restore-state-u8"] }
[target.'cfg(loom)'.dev-dependencies]
loom = "0.7"
[dev-dependencies]
criterion = "0.7"
proptest = "1"
[[bench]]
name = "clock_bench"
harness = false
[lints.rust]
unsafe_code = "deny"
missing_docs = "deny"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(loom)'] }
[lints.clippy]
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
indexing_slicing = "deny"
undocumented_unsafe_blocks = "deny"
[profile.release]
lto = "fat"
codegen-units = 1
strip = true
panic = "abort"
[package.metadata.layers]
tier = "L1"