t2t-clock 0.1.1

clocks that read the time: the OS's wall and monotonic clocks, the CPU's counter, and clocks set by hand.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.98"
name = "t2t-clock"
version = "0.1.1"
authors = ["Atomix Labs"]
build = "build.rs"
exclude = ["benches/results/"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "clocks that read the time: the OS's wall and monotonic clocks, the CPU's counter, and clocks set by hand."
homepage = "https://atomix-labs.github.io/t2t/"
readme = "README.md"
keywords = [
    "clock",
    "monotonic",
    "tsc",
    "rdtsc",
    "no-std",
]
categories = [
    "date-and-time",
    "hardware-support",
    "os",
    "no-std",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/atomix-labs/t2t"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]
targets = [
    "x86_64-unknown-linux-gnu",
    "aarch64-unknown-linux-gnu",
    "aarch64-apple-darwin",
    "x86_64-apple-darwin",
]

[package.metadata.cargo-shear]
ignored-paths = ["tests/compile_fail/*.rs"]

[features]
default = []
std = [
    "dep:libc",
    "derive_more/std",
    "libc/std",
    "t2t-core/std",
]

[lib]
name = "t2t_clock"
path = "src/lib.rs"
bench = false

[[test]]
name = "counter_cross_process"
path = "tests/counter_cross_process.rs"
required-features = ["std"]

[[test]]
name = "trybuild"
path = "tests/trybuild.rs"

[[bench]]
name = "read"
path = "benches/read.rs"
harness = false
required-features = ["std"]

[dependencies.derive_more]
version = "2.1.1"
features = [
    "debug",
    "display",
    "error",
]
default-features = false

[dependencies.t2t-core]
version = "0.1.1"
default-features = false

[dev-dependencies.divan]
version = "0.1.21"

[dev-dependencies.raw-cpuid]
version = "11.6.0"
default-features = false

[dev-dependencies.rstest]
version = "0.27.0"
default-features = false

[dev-dependencies.trybuild]
version = "1.0.121"

[build-dependencies.cfg_aliases]
version = "0.2.2"

[target.'cfg(all(target_pointer_width = "64", any(target_os = "linux", target_os = "macos")))'.dependencies.libc]
version = "0.2.189"
optional = true
default-features = false

[target."cfg(loom)".dependencies.loom]
version = "0.7.2"

[target.'cfg(target_arch = "x86_64")'.dependencies.raw-cpuid]
version = "11.6.0"
default-features = false

[lints.cargo]
non_kebab_case_bins = "deny"

[lints.clippy]
absolute_paths = "deny"
allow_attributes = "deny"
allow_attributes_without_reason = "deny"
arithmetic_side_effects = "deny"
as_conversions = "deny"
await_holding_lock = "deny"
clone_on_ref_ptr = "deny"
create_dir = "deny"
dbg_macro = "deny"
empty_enum_variants_with_brackets = "deny"
empty_enums = "allow"
empty_structs_with_brackets = "deny"
error_impl_error = "deny"
exit = "deny"
expect_used = "deny"
filetype_is_file = "deny"
float_cmp = "deny"
get_unwrap = "deny"
impl_trait_in_params = "deny"
indexing_slicing = "deny"
let_underscore_must_use = "deny"
lossy_float_literal = "deny"
map_err_ignore = "deny"
mem_forget = "deny"
missing_assert_message = "deny"
missing_docs_in_private_items = "deny"
mixed_read_write_in_expression = "deny"
module_inception = "allow"
multiple_unsafe_ops_per_block = "deny"
mutex_atomic = "deny"
mutex_integer = "deny"
panic = "deny"
panic_in_result_fn = "deny"
print_stderr = "deny"
print_stdout = "deny"
pub_without_shorthand = "deny"
rc_buffer = "deny"
rc_mutex = "deny"
redundant_pub_crate = "allow"
redundant_type_annotations = "deny"
same_name_method = "deny"
self_named_module_files = "deny"
semicolon_inside_block = "deny"
std_instead_of_alloc = "deny"
std_instead_of_core = "deny"
str_to_string = "deny"
string_slice = "deny"
suspicious_xor_used_as_pow = "deny"
tests_outside_test_module = "deny"
todo = "deny"
undocumented_unsafe_blocks = "deny"
unimplemented = "deny"
unnecessary_safety_comment = "deny"
unnecessary_safety_doc = "deny"
unnecessary_self_imports = "deny"
unreachable = "deny"
unseparated_literal_suffix = "deny"
unused_result_ok = "deny"
unwrap_in_result = "deny"
unwrap_used = "deny"
verbose_file_reads = "deny"
wildcard_enum_match_arm = "deny"
wildcard_imports = "deny"

[lints.clippy.all]
level = "deny"
priority = -1

[lints.clippy.nursery]
level = "deny"
priority = -1

[lints.clippy.pedantic]
level = "deny"
priority = -1

[lints.rust]
macro_use_extern_crate = "deny"
meta_variable_misuse = "deny"
missing_debug_implementations = "deny"
missing_docs = "deny"
single_use_lifetimes = "deny"
unfulfilled_lint_expectations = "deny"
unknown_lints = "deny"
unreachable_pub = "deny"
unsafe_code = "deny"
unsafe_op_in_unsafe_fn = "deny"
unused_lifetimes = "deny"
unused_must_use = "deny"
unused_qualifications = "allow"
variant_size_differences = "deny"

[lints.rust.rust_2018_idioms]
level = "deny"
priority = -1

[lints.rust.unexpected_cfgs]
level = "deny"
priority = 0
check-cfg = ["cfg(loom)"]

[lints.rust.unused]
level = "deny"
priority = -1

[lints.rustdoc]
bare_urls = "deny"
broken_intra_doc_links = "deny"
invalid_codeblock_attributes = "deny"
invalid_html_tags = "deny"
invalid_rust_codeblocks = "deny"
private_intra_doc_links = "deny"
redundant_explicit_links = "deny"
unescaped_backticks = "deny"