[package] name = "utcnow" version = "0.2.6" edition = "2018" readme = "README.md" categories = ["date-and-time", "no-std"] keywords = ["time", "unixtime", "utc", "no_std", "cross-platform"] authors = ["René Kijewski "] repository = "https://github.com/Kijewski/utcnow" description = "Get the current unixtime in a no-std context" license = "Apache-2.0" [features] default = ["std", "fallback"] fallback = [] std = [] [dependencies] const_fn = "0.4.9" # Optional features: arbitrary = { version = "1", default-features = false, optional = true } castaway = { version = "0.2", default-features = false, optional = true } proptest = { version = "1", default-features = false, optional = true, features = ["std"] } quickcheck = { version = "1", default-features = false, optional = true } # Versions up until 0.7.26 are broken. rkyv = { version = "0.7.27", optional = true } serde = { version = "1", default-features = false, optional = true } [dev-dependencies] # Needed in `quickcheck` tests. quickcheck_macros = { version = "1", default-features = false } # Needed in `proptest` tests. Versions up until 0.8.2 are broken. rand = { version = "0.8.3", default-features = false } # Needed in `serde` tests. Versions up until 1.0.46 are broken. serde_json = { version = "1.0.47", default-features = false, features = ["alloc"] } [target.'cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "ios", target_os = "linux", target_os = "macos", target_os = "openbsd", target_os = "redox"))'.dependencies] rustix = { version = ">= 0.37, < 0.39", features = ["time"] } [target.'cfg(any(target_os = "android", target_os = "emscripten", target_os = "fuchsia", target_os = "haiku", target_os = "illumos", target_os = "netbsd", target_os = "solaris"))'.dependencies] errno = { version = "0.3.0", default-features = false } libc = { version = "0.2.126", default-features = false } [target.'cfg(target_os = "windows")'.dependencies] winapi = { version = "0.3.9", default-features = false, features = ["sysinfoapi"] } [target.'cfg(target_os = "wasi")'.dependencies] wasi = { version = "0.11.0", default-features = false } [target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dependencies] js-sys = "0.3.0" wasm-bindgen = "0.2.0" [target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dev-dependencies] wasm-bindgen-test = "0.3.13" [package.metadata.docs.rs] all-features = true rustdoc-args = ["--generate-link-to-definition", "--cfg=docsrs"] [profile.dev] panic = "abort" [profile.release] panic = "abort"