[package]
name = "swh-graph-grpc-server"
version.workspace = true
readme = "README.md"
edition = "2021"
description = "gRPC service to run the fast queries to the Software Heritage archive graph, using a compressed in-memory representation"
repository = "https://gitlab.softwareheritage.org/swh/devel/swh-graph"
license = "GPL-3.0-or-later"
keywords = ["software-heritage", "graph", "webgraph", "grpc"]
categories = ["compression", "science"]
rust-version = "1.79"

[dependencies]
anyhow.workspace = true
itertools.workspace = true
java-properties = "1.4.1"
value-traits.workspace = true

# CLI & logging
cadence = "1.4.0"
clap.workspace = true
chrono = { version = "0.4.31", features = ["serde"] }
log.workspace = true
sentry = { version = "0.32.1", features = ["anyhow", "tower", "tracing"], optional = true }
sentry-tracing = "0.32.1"
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }

# gRPC
prost = "0.13"
prost-types = "0.13"
tonic = "0.13.1"
tonic-health = "0.13.1"
tonic-reflection = "0.13.1"
tonic-middleware = "0.3.0"
http-body = "1"  # must match the version used by tonic

# serde
serde_json = "1.0"
serde = "1.0.189"
serde_derive = "1.0.189"

# Tokio & async
async-scoped = { version = "0.9.0", features = ["use-tokio"] }
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
tokio-stream = "0.1"

# swh-graph
swh-graph = { workspace = true, features = ["serde"] }

[build-dependencies]
tonic-build = "0.13.0"

[dev-dependencies]
futures = "0.3.30"

[features]
default = ["sentry"]

[[bin]]
name = "swh-graph-grpc-serve"
path = "src/main.rs"
