Files
tavolo/server/crates/tavolo-app/Cargo.toml
T
woggioni 7b3b38ccbc
CI / Build and push docker image (push) Successful in 4m20s
Rewrite the backend in Rust with Axum
Replace the Python/kaya server in server/ with a Rust Cargo workspace of
three crates mirroring the old layout: tavolo-platform (lobby API, live-game
store, websocket endpoint, deadline scheduler, stats/Elo, OIDC sessions),
tavolo-scopone (pure scopone scientifico rules plus the platform adapter)
and tavolo-app (composition root and the `tavolo` binary with
serve/migrate/backfill-elo).

The HTTP and WebSocket contracts, error messages, Redis key layout and
Postgres schema are unchanged, so the existing web/ frontend and in-flight
games keep working. Notable differences: sessions are JSON under
tavolo:session: (Python pickle sessions invalidate once), LOGGING_CONFIG is
ignored in favour of RUST_LOG, DATABASE_URL must be Postgres, sqlx migrations
replace aerich, and OpenTelemetry exports Rust process metrics instead of
CPython gc metrics (no Postgres/Redis client instrumentation).

Docker Compose and the Kubernetes manifest now run the single Rust image
(embedded migrations, /static and /assets served by the app); the release CI
keeps building server/Dockerfile. The full test suite (scopone rules,
platform store/deadlines/stats/websockets, OIDC login flow, scopone e2e) is
ported and runs with cargo test --workspace; Redis/Postgres integration tests
are gated on TEST_REDIS_URL/TEST_DATABASE_URL.
2026-10-02 13:54:55 +00:00

64 lines
2.0 KiB
TOML

[package]
name = "tavolo-app"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "The deployable tavolo application: composition root and HTTP/WebSocket server"
[[bin]]
name = "tavolo"
path = "src/main.rs"
[dependencies]
async-trait.workspace = true
axum.workspace = true
base64.workspace = true
chrono.workspace = true
clap.workspace = true
futures-util.workspace = true
hex.workspace = true
jsonwebtoken.workspace = true
opentelemetry = { version = "0.33", optional = true, default-features = false, features = ["trace", "metrics", "logs"] }
opentelemetry-appender-tracing = { version = "0.33", optional = true, default-features = false }
opentelemetry-otlp = { version = "0.33", optional = true, default-features = false, features = ["http-proto", "reqwest-client", "trace", "metrics", "logs"] }
opentelemetry_sdk = { version = "0.33", optional = true, default-features = false, features = ["trace", "metrics", "logs", "rt-tokio"] }
percent-encoding.workspace = true
rand.workspace = true
redis.workspace = true
regex.workspace = true
reqwest.workspace = true
serde.workspace = true
serde_json.workspace = true
sha2.workspace = true
sqlx.workspace = true
sysinfo = { version = "0.39", optional = true }
tavolo-platform = { path = "../tavolo-platform" }
tavolo-scopone = { path = "../tavolo-scopone" }
thiserror.workspace = true
tokio.workspace = true
tower.workspace = true
tower-http.workspace = true
tracing.workspace = true
tracing-opentelemetry = { version = "0.34", optional = true, default-features = false }
tracing-subscriber.workspace = true
url.workspace = true
uuid.workspace = true
[dev-dependencies]
axum = { workspace = true, features = ["ws", "macros"] }
futures-util.workspace = true
http-body-util = "0.1"
tokio-tungstenite = "0.24"
tower = { workspace = true, features = ["util"] }
[features]
default = ["otel"]
otel = [
"dep:opentelemetry",
"dep:opentelemetry_sdk",
"dep:opentelemetry-otlp",
"dep:opentelemetry-appender-tracing",
"dep:tracing-opentelemetry",
"dep:sysinfo",
]