mirror of
https://github.com/chronotope/chrono.git
synced 2025-09-27 13:01:37 +00:00
Document crate features for lib.rs
This commit is contained in:
parent
98c3640760
commit
a7635fbe18
15
Cargo.toml
15
Cargo.toml
@ -16,26 +16,37 @@ rust-version = "1.61.0"
|
|||||||
[lib]
|
[lib]
|
||||||
name = "chrono"
|
name = "chrono"
|
||||||
|
|
||||||
[features]
|
[features] # Don't forget to adjust `ALL_NON_EXCLUSIVE_FEATURES` in CI scripts when adding a feature or an optional dependency.
|
||||||
# Don't forget to adjust `ALL_NON_EXCLUSIVE_FEATURES` in CI scripts when adding a feature or an optional dependency.
|
|
||||||
default = ["clock", "std"]
|
default = ["clock", "std"]
|
||||||
|
# Enable features that depend on allocation (primarily string formatting).
|
||||||
alloc = []
|
alloc = []
|
||||||
|
# Implements `TryFrom<SystemTime>` and `std::error::Error` for error types, implies of `alloc`.
|
||||||
std = ["alloc"]
|
std = ["alloc"]
|
||||||
|
# Enables reading the local timezone (`Local`), implies `now`.
|
||||||
clock = [
|
clock = [
|
||||||
"dep:windows-targets",
|
"dep:windows-targets",
|
||||||
"dep:iana-time-zone",
|
"dep:iana-time-zone",
|
||||||
"dep:android-tzdata",
|
"dep:android-tzdata",
|
||||||
"now",
|
"now",
|
||||||
]
|
]
|
||||||
|
# Enables reading the system time (`now()`), on most platforms using the standard library.
|
||||||
now = []
|
now = []
|
||||||
|
# Enable features that depend on allocation (primarily string formatting).
|
||||||
serde = ["dep:serde"]
|
serde = ["dep:serde"]
|
||||||
# Note that rkyv-16, rkyv-32, and rkyv-64 are mutually exclusive.
|
# Note that rkyv-16, rkyv-32, and rkyv-64 are mutually exclusive.
|
||||||
|
# Enable serialization/deserialization via rkyv, using 16-bit integers for integral `*size` types.
|
||||||
rkyv-16 = ["dep:rkyv", "rkyv?/size_16"]
|
rkyv-16 = ["dep:rkyv", "rkyv?/size_16"]
|
||||||
|
# Enable serialization/deserialization via rkyv, using 32-bit integers for integral `*size` types.
|
||||||
rkyv-32 = ["dep:rkyv", "rkyv?/size_32"]
|
rkyv-32 = ["dep:rkyv", "rkyv?/size_32"]
|
||||||
|
# Enable serialization/deserialization via rkyv, using 64-bit integers for integral `*size` types.
|
||||||
rkyv-64 = ["dep:rkyv", "rkyv?/size_64"]
|
rkyv-64 = ["dep:rkyv", "rkyv?/size_64"]
|
||||||
|
# Enable rkyv validation support using `bytecheck`.
|
||||||
rkyv-validation = ["dep:rkyv", "rkyv?/validation"]
|
rkyv-validation = ["dep:rkyv", "rkyv?/validation"]
|
||||||
|
# Construct arbitrary instances of a type with the arbitrary crate.
|
||||||
arbitrary = ["dep:arbitrary"]
|
arbitrary = ["dep:arbitrary"]
|
||||||
|
# Interface with the JS Date API for the `wasm32` target.
|
||||||
wasmbind = ["dep:wasm-bindgen", "dep:js-sys"]
|
wasmbind = ["dep:wasm-bindgen", "dep:js-sys"]
|
||||||
|
# Enable localization. This adds various methods with a `_localized` suffix.
|
||||||
unstable-locales = ["dep:pure-rust-locales"]
|
unstable-locales = ["dep:pure-rust-locales"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user