1[package] 2name = "chrono" 3version = "0.4.34" 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" 12exclude = ["/ci/*"] 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-targets"] 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 } 42rustc-serialize = { version = "0.3.20", optional = true } 43serde = { version = "1.0.99", default-features = false, optional = true } 44pure-rust-locales = { version = "0.8", optional = true } 45rkyv = { version = "0.7.43", optional = true, default-features = false } 46arbitrary = { 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] 49wasm-bindgen = { version = "0.2", optional = true } 50js-sys = { version = "0.3", optional = true } # contains FFI bindings for the JS Date API 51 52[target.'cfg(windows)'.dependencies] 53windows-targets = { version = "0.52", optional = true } 54 55[target.'cfg(windows)'.dev-dependencies] 56windows-bindgen = { version = "0.52" } 57 58[target.'cfg(unix)'.dependencies] 59iana-time-zone = { version = "0.1.45", optional = true, features = ["fallback"] } 60 61[target.'cfg(target_os = "android")'.dependencies] 62android-tzdata = { version = "0.1.1", optional = true } 63 64[dev-dependencies] 65serde_json = { version = "1" } 66serde_derive = { version = "1", default-features = false } 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