[package] name = "shared-api-lib" version = "0.1.0" edition = "2021" [lib] name = "shared_api_lib" path = "src/lib.rs" [features] default = ["metrics", "auth", "rate-limit", "websocket"] metrics = ["prometheus"] auth = ["jsonwebtoken", "uuid"] rate-limit = [] websocket = ["tokio-tungstenite", "futures"] tls = ["tokio-rustls", "rustls", "rustls-pemfile"] [dependencies] # Web framework axum = { version = "0.8", features = ["ws"] } tokio = { version = "1.48", features = ["full"] } tower = "0.5" tower-http = { version = "0.6", features = ["trace", "cors"] } # Serialization serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" toml = "0.9" chrono = { version = "0.4", features = ["serde"] } # Error handling thiserror = "2.0" anyhow = "1.0" # Logging tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] } # Utilities http = "1.3" hyper = "1.8" ipnetwork = "0.21" # Optional: Metrics prometheus = { version = "0.14", optional = true } # Optional: Auth jsonwebtoken = { version = "10.2", features = ["aws_lc_rs"], optional = true } uuid = { version = "1.18", features = ["v4", "serde"], optional = true } # Optional: WebSocket tokio-tungstenite = { version = "0.28", optional = true } futures = { version = "0.3", optional = true } # Optional: TLS tokio-rustls = { version = "0.26", optional = true } rustls = { version = "0.23", optional = true } rustls-pemfile = { version = "2.2", optional = true } # Testing [dev-dependencies] mockito = "1.7" proptest = "1.9"