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