# 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"
name = "endpoint-libs"
version = "1.7.2"
authors = ["Veon <dveonloch@protonmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Common dependencies to be used with Pathscale projects, projects that use [endpoint-gen](https://github.com/pathscale/endpoint-gen), and projects that use honey_id-types."
readme = "README.md"
license = "MIT"
repository = "https://github.com/pathscale/endpoint-libs"

[package.metadata.cargo-all-features]
always_include_features = ["types"]
denylist = [
    "full",
    "log_throttling",
]

[features]
database = [
    "dep:tokio-postgres",
    "dep:dashmap",
    "dep:secrecy",
    "dep:postgres-from-row",
    "dep:deadpool-postgres",
]
default = ["types"]
error_aggregation = [
    "dep:regex",
    "dep:lazy_static",
]
full = [
    "types",
    "ws",
    "database",
    "signal",
    "scheduler",
    "log_reader",
    "error_aggregation",
    "log_throttling",
    "ws-http1",
    "ws-tls12",
]
log_reader = [
    "dep:tempfile",
    "dep:regex",
    "dep:rev_lines",
    "dep:lazy_static",
]
log_throttling = ["dep:tracing-throttle"]
s3-sync = []
scheduler = ["dep:tokio-cron-scheduler"]
signal = [
    "dep:tokio-util",
    "dep:lazy_static",
]
types = []
ws = [
    "types",
    "signal",
    "dep:tokio-tungstenite",
    "dep:tokio-rustls",
    "dep:rustls",
    "dep:rustls-pemfile",
    "dep:parking_lot",
    "dep:dashmap",
    "dep:reqwest",
    "dep:async-trait",
    "dep:hyper",
    "dep:hyper-util",
    "dep:http-body-util",
    "dep:httpdate",
    "dep:webpki-roots",
]
ws-http1 = ["hyper/http1"]
ws-tls12 = [
    "rustls/tls12",
    "tokio-rustls/tls12",
]

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

[[example]]
name = "ws_echo_rustls"
path = "examples/ws_echo_rustls.rs"
required-features = ["ws"]

[[example]]
name = "ws_echo_server"
path = "examples/ws-echo/main.rs"
required-features = ["ws"]

[[example]]
name = "ws_echo_ws_client"
path = "examples/ws_echo_ws_client.rs"
required-features = ["ws"]

[dependencies.alloy-primitives]
version = "1.3.0"
features = ["std"]
default-features = false

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

[dependencies.bytes]
version = "1.7"

[dependencies.chrono]
version = "0.4"

[dependencies.clap]
version = "4.5"
features = [
    "derive",
    "env",
]

[dependencies.convert_case]
version = "0.6"

[dependencies.dashmap]
version = "6.0"
optional = true

[dependencies.deadpool-postgres]
version = "0.14"
features = ["serde"]
optional = true

[dependencies.eyre]
version = "0.6"

[dependencies.futures]
version = "0.3"

[dependencies.hex]
version = "0.4"

[dependencies.http-body-util]
version = "0.1"
optional = true

[dependencies.httpdate]
version = "1.0"
optional = true

[dependencies.hyper]
version = "1"
features = [
    "http2",
    "server",
    "client",
]
optional = true

[dependencies.hyper-rustls]
version = "0.27.9"
features = ["webpki-tokio"]
default-features = false

[dependencies.hyper-util]
version = "0.1"
features = [
    "tokio",
    "server-auto",
]
optional = true

[dependencies.itertools]
version = "0.12"

[dependencies.lazy_static]
version = "1.5"
optional = true

[dependencies.opentelemetry]
version = "0.31"
features = ["logs"]

[dependencies.opentelemetry-appender-tracing]
version = "0.31"

[dependencies.opentelemetry-otlp]
version = "0.31"
features = [
    "trace",
    "logs",
    "http-proto",
]

[dependencies.opentelemetry-semantic-conventions]
version = "0.31"

[dependencies.opentelemetry_sdk]
version = "0.31"
features = [
    "rt-tokio",
    "logs",
]

[dependencies.parking_lot]
version = "0.12"
optional = true

[dependencies.postgres-from-row]
version = "0.5"
optional = true

[dependencies.regex]
version = "1.5"
optional = true

[dependencies.reqwest]
version = "0.12"
features = [
    "rustls-tls-webpki-roots",
    "charset",
    "http2",
    "system-proxy",
]
optional = true
default-features = false

[dependencies.rev_lines]
version = "0.3"
optional = true

[dependencies.rust_decimal]
version = "1.36"

[dependencies.rustls]
version = "0.23"
features = [
    "ring",
    "logging",
    "std",
]
optional = true
default-features = false

[dependencies.rustls-pemfile]
version = "2.1"
optional = true

[dependencies.secrecy]
version = "0.8"
features = ["serde"]
optional = true

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde_json]
version = "1.0"
features = ["raw_value"]

[dependencies.serde_path_to_error]
version = "0.1"

[dependencies.tempfile]
version = "3.19"
optional = true

[dependencies.tokio]
version = "1.39"
features = ["full"]

[dependencies.tokio-cron-scheduler]
version = "0.11"
optional = true

[dependencies.tokio-postgres]
version = "0.7"
optional = true

[dependencies.tokio-rustls]
version = "0.26"
features = [
    "ring",
    "logging",
]
optional = true
default-features = false

[dependencies.tokio-tungstenite]
version = "0.29.0"
features = [
    "rustls-tls-webpki-roots",
    "connect",
]
optional = true
default-features = false

[dependencies.tokio-util]
version = "0.7"
optional = true

[dependencies.tonic]
version = "0.14"

[dependencies.tracing]
version = "0.1"

[dependencies.tracing-appender]
version = "0.2"

[dependencies.tracing-opentelemetry]
version = "0.32"

[dependencies.tracing-subscriber]
version = "0.3"
features = [
    "env-filter",
    "std",
    "fmt",
]

[dependencies.tracing-throttle]
version = "0.4"
features = ["async"]
optional = true

[dependencies.urlencoding]
version = "2.1"

[dependencies.webpki-roots]
version = "1.0.7"
optional = true

[dev-dependencies.tempfile]
version = "3.19"

[dev-dependencies.tokio]
version = "1.39"
features = [
    "full",
    "test-util",
]

[dev-dependencies.tracing-throttle]
version = "0.4"
features = [
    "async",
    "test-helpers",
]

[dev-dependencies.uuid]
version = "1"
features = [
    "v4",
    "serde",
]
