[package]
edition = "2024"
rust-version = "1.94"
name = "qubit-clock"
version = "0.12.0"
authors = ["Haixing Hu <starfish.hu@gmail.com>"]
build = false
include = [
"/Cargo.toml",
"/LICENSE",
"/README.md",
"/README.zh_CN.md",
"/src/**",
"/doc/**",
"/tests/**",
"/benches/**",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Injectable wall and monotonic clocks with deterministic timers"
homepage = "https://github.com/qubit-ltd/rs-clock"
documentation = "https://docs.rs/qubit-clock"
readme = "README.md"
keywords = [
"clock",
"time",
"monotonic",
"mock",
"testing",
]
categories = [
"date-and-time",
"development-tools::testing",
]
license = "Apache-2.0"
repository = "https://github.com/qubit-ltd/rs-clock"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
default = []
loom-model = [
"dep:loom",
"test-util",
]
test-util = []
tokio = [
"dep:pin-project-lite",
"dep:tokio",
]
[lib]
name = "qubit_clock"
path = "src/lib.rs"
doctest = true
[[test]]
name = "error_tests"
path = "tests/error_tests.rs"
[[test]]
name = "internal_tests"
path = "tests/internal_tests.rs"
[[test]]
name = "monotonic_tests"
path = "tests/monotonic_tests.rs"
[[test]]
name = "scenario_tests"
path = "tests/scenario_tests.rs"
[[test]]
name = "sleep_tests"
path = "tests/sleep_tests.rs"
[[test]]
name = "std_timer_notification_tests"
path = "tests/timer/internal/std_timer_notification_tests.rs"
[[test]]
name = "std_timer_scheduler_tests"
path = "tests/timer/internal/std_timer_scheduler_tests.rs"
[[test]]
name = "std_timer_spawn_failure_tests"
path = "tests/timer/internal/std_timer_spawn_failure_tests.rs"
[[test]]
name = "std_timer_worker_failure_tests"
path = "tests/timer/internal/std_timer_worker_failure_tests.rs"
[[test]]
name = "test_util_tests"
path = "tests/test_util_tests.rs"
[[test]]
name = "timer_tests"
path = "tests/timer_tests.rs"
[[test]]
name = "wall_tests"
path = "tests/wall_tests.rs"
[[bench]]
name = "manual_timer"
path = "benches/manual_timer.rs"
harness = false
[[bench]]
name = "std_timer_scheduler"
path = "benches/std_timer_scheduler.rs"
harness = false
[[bench]]
name = "tokio_timer"
path = "benches/tokio_timer.rs"
harness = false
required-features = ["tokio"]
[dependencies.loom]
version = "0.7"
optional = true
[dependencies.pin-project-lite]
version = "0.2"
optional = true
[dependencies.qubit-collections]
version = "0.2"
[dependencies.thiserror]
version = "2.0"
[dependencies.tokio]
version = "1.53"
features = [
"rt",
"sync",
"time",
]
optional = true
[dev-dependencies.criterion]
version = "0.8"
default-features = false
[dev-dependencies.tokio]
version = "1.53"
features = [
"macros",
"rt",
"sync",
"test-util",
"time",
]
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
"cfg(coverage)",
"cfg(loom)",
"cfg(tokio_unstable)",
]