deep-time 0.1.0-beta.3

High-precision, no-std, no-alloc date-time library, leap-seconds, time scales, relativistic time, and a powerful date & duration parser
Documentation
[package]
name = "deep-time"
version = "0.1.0-beta.3"
authors = ["ragardner <github@ragardner.simplelogin.com>"]
edition = "2024"
description = "High-precision, no-std, no-alloc date-time library, leap-seconds, time scales, relativistic time, and a powerful date & duration parser"
license = "Apache-2.0"
repository = "https://github.com/ragardner/deep-time"
keywords = ["time", "date", "duration", "astronomy", "parser"]
categories = ["date-and-time", "science"]
readme = "README.md"
rust-version = "1.90"

[dependencies]
hashbrown    = { version = "0.17",  optional = true }
aho-corasick = { version = "1.1.4", optional = true }
once_cell    = { version = "1.21",  optional = true, default-features = false, features = ["alloc"] }
jiff         = { version = "0.2.23", optional = true, default-features = false }
chrono       = { version = "0.4",   optional = true, default-features = false }
chrono-tz    = { version = "0.10",  optional = true, default-features = false }
hifitime     = { version = "4.3",   optional = true, default-features = false }
serde        = { version = "1.0",   optional = true, default-features = false, features = ["derive", "rc"] }
tsify        = { version = "=0.5.6", optional = true }
wasm-bindgen = { version = "0.2",   optional = true, features = ["serde-serialize"] }
js-sys       = { version = "0.3",   optional = true }
sys-locale   = { version = "0.3",   optional = true }

[features]

# ──────────────────────────────────────────────────────────────
# CORE FEATURES
# ──────────────────────────────────────────────────────────────

default = []
panic-handler = []
tz = []
wire = []

alloc = [
    "jiff?/alloc",
    "chrono?/alloc",
]

mars = []
sidereal = []
sidereal-earth = ["sidereal"]
eop = ["alloc"]

# std must enable alloc
std = [
    "alloc",
    "jiff?/std",
    "chrono?/std",
    "hifitime?/std",
]

# ──────────────────────────────────────────────────────────────
# PARSER / LANGUAGES (no_std friendly)
# ──────────────────────────────────────────────────────────────

parse = [
    "alloc",
    "dep:aho-corasick",
    "dep:once_cell",
    "dep:hashbrown",
]

es = ["parse"]
de = ["parse"]
fr = ["parse"]
euro = [
    "parse",
    "es",
    "de",
    "fr",
]
lang = [
    "parse",
    "euro",
]

# ──────────────────────────────────────────────────────────────
# SERIALIZATION FEATURES
# ──────────────────────────────────────────────────────────────

serde = [
    "dep:serde",
    "jiff?/serde",
    "chrono?/serde",
    "hifitime?/serde",
]

# ──────────────────────────────────────────────────────────────
# DATETIME FEATURES
# ──────────────────────────────────────────────────────────────

jiff = [
    "dep:jiff",
    "jiff?/alloc",
]

jiff-tz = [
    "std",
    "jiff",
    "jiff?/tzdb-bundle-always",
]

chrono = [
    "dep:chrono",
    "chrono?/alloc",
]

chrono-tz = [
    "chrono",
    "dep:chrono-tz",
]

hifitime = [
    "dep:hifitime",
]

# ──────────────────────────────────────────────────────────────
# WEB FEATURES
# ──────────────────────────────────────────────────────────────

js = [
    "std",
    "serde",
    "dep:tsify",
    "dep:wasm-bindgen",
    "dep:js-sys",
    "jiff?/js",
    "chrono?/wasmbind",
    "sys-locale?/js",
]

tsify = [
    "serde",
    "dep:tsify",
    "dep:wasm-bindgen",
    "js",
]

# ──────────────────────────────────────────────────────────────
# OTHER FEATURES
# ──────────────────────────────────────────────────────────────

locale = [
    "alloc",
    "std",
    "dep:sys-locale",
]
all = [
    "parse",
    "tz",
    "lang",
    "locale",
    "eop",
    "mars",
    "sidereal",
    "sidereal-earth",
    "wire",
    "js",
    "chrono-tz",
    "jiff-tz",
    "hifitime",
    "serde",
]
perf-tests = ["parse", "std"]
eop-tests = ["eop", "std"]

[lints.clippy]
non_canonical_partial_ord_impl = "allow"
wrong_self_convention          = "allow"
excessive_precision            = "allow"
indexing_slicing               = "allow"
too_many_arguments             = "allow"
result_unit_err                = "allow"
unwrap_used                    = "deny"
expect_used                    = "deny"
panic                          = "deny"

[package.metadata.docs.rs]
all-features = true