1[package]
2name = "chrono"
3version = "0.4.40"
4description = "Date and time library for Rust"
5homepage = "https://github.com/chronotope/chrono"
6documentation = "https://docs.rs/chrono/"
7repository = "https://github.com/chronotope/chrono"
8keywords = ["date", "time", "calendar"]
9categories = ["date-and-time"]
10readme = "README.md"
11license = "MIT OR Apache-2.0"
12include = ["src/*", "tests/*.rs", "LICENSE.txt", "CITATION.cff"]
13edition = "2021"
14rust-version = "1.61.0"
15
16[lib]
17name = "chrono"
18
19[features]
20# Don't forget to adjust `ALL_NON_EXCLUSIVE_FEATURES` in CI scripts when adding a feature or an optional dependency.
21default = ["clock", "std", "oldtime", "wasmbind"]
22alloc = []
23libc = []
24winapi = ["windows-link"]
25std = ["alloc"]
26clock = ["winapi", "iana-time-zone", "android-tzdata", "now"]
27now = ["std"]
28oldtime = []
29wasmbind = ["wasm-bindgen", "js-sys"]
30unstable-locales = ["pure-rust-locales"]
31# Note that rkyv-16, rkyv-32, and rkyv-64 are mutually exclusive.
32rkyv = ["dep:rkyv", "rkyv/size_32"]
33rkyv-16 = ["dep:rkyv", "rkyv?/size_16"]
34rkyv-32 = ["dep:rkyv", "rkyv?/size_32"]
35rkyv-64 = ["dep:rkyv", "rkyv?/size_64"]
36rkyv-validation = ["rkyv?/validation"]
37# Features for internal use only:
38__internal_bench = []
39
40[dependencies]
41num-traits = { version = "0.2", default-features = false }
42serde = { version = "1.0.99", default-features = false, optional = true }
43pure-rust-locales = { version = "0.8", optional = true }
44rkyv = { version = "0.7.43", optional = true, default-features = false }
45arbitrary = { version = "1.0.0", features = ["derive"], optional = true }
46
47[target.'cfg(all(target_arch = "wasm32", not(any(target_os = "emscripten", target_os = "wasi"))))'.dependencies]
48wasm-bindgen = { version = "0.2", optional = true }
49js-sys = { version = "0.3", optional = true } # contains FFI bindings for the JS Date API
50
51[target.'cfg(windows)'.dependencies]
52windows-link = { version = "0.1", optional = true }
53
54[target.'cfg(windows)'.dev-dependencies]
55windows-bindgen = { version = "0.60" } # MSRV is 1.74
56
57[target.'cfg(unix)'.dependencies]
58iana-time-zone = { version = "0.1.45", optional = true, features = ["fallback"] }
59
60[target.'cfg(target_os = "android")'.dependencies]
61android-tzdata = { version = "0.1.1", optional = true }
62
63[dev-dependencies]
64serde_json = { version = "1" }
65serde_derive = { version = "1", default-features = false }
66similar-asserts = { version = "1.6.1" }
67bincode = { version = "1.3.0" }
68
69[target.'cfg(all(target_arch = "wasm32", not(any(target_os = "emscripten", target_os = "wasi"))))'.dev-dependencies]
70wasm-bindgen-test = "0.3"
71
72[package.metadata.docs.rs]
73features = ["arbitrary", "rkyv", "serde", "unstable-locales"]
74rustdoc-args = ["--cfg", "docsrs"]
75
76[package.metadata.playground]
77features = ["serde"]
78