# 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.88"
name = "tsoracle-server"
version = "0.2.7"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Embeddable gRPC server for the timestamp oracle."
homepage = "https://github.com/prisma-risk/tsoracle"
documentation = "https://docs.rs/tsoracle-server"
readme = "README.md"
keywords = [
    "tsoracle",
    "grpc",
    "server",
    "timestamp",
    "oracle",
]
categories = [
    "network-programming",
    "database",
]
license = "Apache-2.0"
repository = "https://github.com/prisma-risk/tsoracle"
resolver = "2"

[package.metadata.docs.rs]
features = [
    "tls-rustls",
    "tracing",
    "reflection",
    "metrics",
]
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
bt = [
    "tsoracle-core/bt",
    "tsoracle-consensus/bt",
]
default = [
    "tls-rustls",
    "tracing",
]
failpoints = ["tsoracle-failpoint/failpoints"]
metrics = ["dep:metrics"]
reflection = [
    "dep:tonic-reflection",
    "tsoracle-proto/reflection",
]
test-fakes = []
test-support = ["test-fakes"]
tls-native = ["tonic/tls-native-roots"]
tls-rustls = ["tonic/tls-aws-lc"]
tracing = ["dep:tracing"]
yieldpoints = ["tsoracle-yieldpoint/yieldpoints"]

[lib]
name = "tsoracle_server"
path = "src/lib.rs"

[[test]]
name = "e2e"
path = "tests/e2e.rs"
required-features = ["test-support"]

[[test]]
name = "embedded_router"
path = "tests/embedded_router.rs"
required-features = ["test-support"]

[[test]]
name = "fence_yieldpoint"
path = "tests/fence_yieldpoint.rs"
required-features = [
    "yieldpoints",
    "test-fakes",
]

[[test]]
name = "leader_watch"
path = "tests/leader_watch.rs"
required-features = ["test-fakes"]

[[test]]
name = "leadership_churn"
path = "tests/leadership_churn.rs"
required-features = ["test-support"]

[[test]]
name = "metrics"
path = "tests/metrics.rs"
required-features = [
    "test-support",
    "metrics",
]

[[test]]
name = "serve_shutdown"
path = "tests/serve_shutdown.rs"
required-features = ["test-fakes"]

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

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

[dependencies.async-trait]
version = "0.1"

[dependencies.futures]
version = "0.3"

[dependencies.metrics]
version = "0.24"
optional = true

[dependencies.parking_lot]
version = "0.12"

[dependencies.prost]
version = "0.14"

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
version = "1"
features = [
    "macros",
    "rt-multi-thread",
    "sync",
    "time",
    "net",
    "fs",
    "signal",
]

[dependencies.tokio-stream]
version = "0.1"
features = ["sync"]

[dependencies.tonic]
version = "0.14"

[dependencies.tonic-prost]
version = "0.14"

[dependencies.tonic-reflection]
version = "0.14"
optional = true

[dependencies.tracing]
version = "0.1"
optional = true

[dependencies.tsoracle-consensus]
version = "0.1.9"

[dependencies.tsoracle-core]
version = "0.2.4"

[dependencies.tsoracle-failpoint]
version = "0.1.1"

[dependencies.tsoracle-proto]
version = "0.2.3"

[dependencies.tsoracle-yieldpoint]
version = "0.1.6"

[dev-dependencies.metrics-util]
version = "0.19"

[dev-dependencies.tokio]
version = "1"
features = [
    "macros",
    "rt-multi-thread",
    "sync",
    "time",
    "net",
    "fs",
    "test-util",
]

[dev-dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]

[dev-dependencies.tsoracle-core]
version = "0.2.4"
features = ["test-clock"]

[target."cfg(unix)".dev-dependencies.nix]
version = "0.30"
features = [
    "signal",
    "process",
]
default-features = false
