[package]
name = "endpoint-libs"
version = "1.7.21"
edition = "2024"
authors = ["Veon <dveonloch@protonmail.com>"]
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."
repository = "https://github.com/pathscale/endpoint-libs"
readme = "README.md"
license = "MIT"
[features]
default = ["types"]
full = [
"types",
"ws",
"database",
"signal",
"scheduler",
"log_reader",
"error_aggregation",
"log_throttling",
"ws-http1",
"ws-tls12",
]
types = []
ws-core = [
"types",
"signal",
"dep:parking_lot",
"dep:dashmap",
"dep:async-trait",
"dep:httpdate",
]
ws-client = [
"ws-core",
"dep:tokio-tungstenite",
"dep:tokio-rustls",
"dep:rustls",
"dep:hyper",
"dep:hyper-util",
"dep:http-body-util",
"dep:webpki-roots",
]
ws = [
"ws-core",
"dep:tokio-tungstenite",
"dep:tokio-rustls",
"dep:rustls",
"dep:rustls-pemfile",
"dep:reqwest",
"dep:hyper",
"dep:hyper-util",
"dep:http-body-util",
"dep:webpki-roots",
]
database = [
"dep:tokio-postgres",
"dep:dashmap",
"dep:secrecy",
"dep:postgres-from-row",
"dep:deadpool-postgres",
]
signal = [
"dep:tokio-util",
"dep:lazy_static",
]
scheduler = [
"dep:tokio-cron-scheduler",
]
log_reader = [
"dep:tempfile",
"dep:regex",
"dep:rev_lines",
"dep:lazy_static",
]
error_aggregation = [
"dep:regex",
"dep:lazy_static",
]
log_throttling = ["dep:tracing-throttle"]
s3-sync = ["cert-provider/s3-sync"]
ws-http1 = ["ws", "hyper/http1"]
ws-tls12 = ["ws", "rustls/tls12", "tokio-rustls/tls12"]
ws-wtx = [
"ws-core",
"dep:wtx",
"dep:httparse",
"dep:sha1",
"dep:base64",
"dep:tokio-rustls",
"dep:rustls",
"dep:rustls-pemfile",
]
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["raw_value"] }
eyre = "0.6"
convert_case = "0.6"
itertools = "0.12"
clap = { version = "4.5", features = ["derive", "env"] }
futures = "0.3"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = [
"env-filter",
"std",
"fmt",
] }
bytes = "1.7"
chrono = {version = "0.4.44", default-features = false, features = ["oldtime", "std", "now"]}
urlencoding = "2.1"
hex = "0.4"
rust_decimal = "1.36"
tracing-appender = "0.2"
serde_path_to_error = "0.1"
alloy-primitives = { version = "1.3.0", features = [
"std",
], default-features = false }
tokio-tungstenite = { version = "0.29.0", default-features = false, features = [
"rustls-tls-webpki-roots",
"connect",
], optional = true }
tokio-rustls = { version = "0.26", optional = true, default-features = false, features = ["ring", "logging"] }
rustls-pemfile = { version = "2.1", optional = true }
rustls = { version = "0.23", optional = true, default-features = false, features = ["ring", "logging", "std"] }
tokio = { version = "1.39", features = ["full"] }
tokio-util = { version = "0.7", optional = true }
tokio-cron-scheduler = { version = "0.11", optional = true }
tokio-postgres = { version = "0.7", optional = true }
postgres-from-row = { version = "0.5", optional = true }
deadpool-postgres = { version = "0.14", features = ["serde"], optional = true }
parking_lot = { version = "0.12", optional = true }
dashmap = { version = "6.0", optional = true }
reqwest = { version = "0.12", default-features = false, features = [
"rustls-tls-webpki-roots",
"charset",
"http2",
"system-proxy",
], optional = true }
secrecy = { version = "0.8", features = ["serde"], optional = true }
tempfile = { version = "3.19", optional = true }
regex = { version = "1.5", optional = true }
rev_lines = { version = "0.3", optional = true }
lazy_static = { version = "1.5", optional = true }
async-trait = { version = "0.1", optional = true }
hyper = { version = "1", features = ["http2", "server", "client"], optional = true }
hyper-util = { version = "0.1", features = ["tokio", "server-auto"], optional = true }
http-body-util = { version = "0.1", optional = true }
httpdate = { version = "1.0", optional = true }
httparse = { version = "1.10", optional = true }
sha1 = { version = "0.11", optional = true }
base64 = { version = "0.22", optional = true }
tracing-throttle = { version = "0.4", features = ["async"], optional = true }
webpki-roots = { version = "1.0.7", optional = true }
wtx = { version = "0.44", default-features = false, features = [
"web-socket",
"web-socket-handshake",
"http2",
"tokio",
"tokio-rustls",
], optional = true }
hyper-rustls = { version = "0.27.9", default-features = false, features = ["webpki-tokio"] }
opentelemetry = { version = "0.31", features = ["logs"] }
opentelemetry_sdk = { version = "0.31", features = ["rt-tokio", "logs"] }
opentelemetry-otlp = { version = "0.31", features = ["trace", "logs", "http-proto"] }
opentelemetry-semantic-conventions = "0.31"
tracing-opentelemetry = "0.32"
opentelemetry-appender-tracing = "0.31"
tonic = "0.14"
[dev-dependencies]
tempfile = "3.19"
tokio = { version = "1.39", features = ["full", "test-util"] }
tracing-throttle = { version = "0.4", features = ["async", "test-helpers"] }
uuid = { version = "1", features = ["v4", "serde"] }
rcgen = "0.14"
cert-provider = {git = "https://github.com/dVeon-loch/cert-provider.git", features = ["dns01"]}
[[example]]
name = "ws_echo_rustls"
required-features = ["ws"]
[[example]]
name = "ws_echo_ws_client"
required-features = ["ws"]
[[example]]
name = "ws_echo_server"
path = "examples/ws-echo/main.rs"
required-features = ["ws"]
[[example]]
name = "ws_echo_server_wtx"
path = "examples/ws-echo/main.rs"
required-features = ["ws-wtx"]
[package.metadata.cargo-all-features]
always_include_features = ["types"]
denylist = [
"full",
"log_throttling",
]
skip_feature_sets = [
["ws", "ws-wtx"],
["ws-http1", "ws-wtx"],
["ws-tls12", "ws-wtx"],
]