[package] name = "roadster" version = "0.6.20" edition = "2021" publish = true description = "A \"Batteries Included\" web framework for rust designed to get you moving fast." repository = "https://github.com/roadster-rs/roadster" license = "MIT OR Apache-2.0" keywords = ["web", "framework"] categories = ["web-programming", "web-programming::http-server"] # Determined using `cargo msrv` -- https://github.com/foresterre/cargo-msrv rust-version = "1.77.2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] default = ["sidekiq", "db-sql", "open-api", "jwt-ietf", "cli", "otel"] http = ["dep:axum", "dep:axum-extra", "dep:tower", "dep:tower-http", "dep:http-body-util", "dep:mime"] open-api = ["http", "dep:aide", "dep:schemars"] sidekiq = ["dep:rusty-sidekiq", "dep:bb8", "dep:num_cpus"] db-sql = ["dep:sea-orm", "dep:sea-orm-migration"] email = ["dep:lettre"] email-smtp = ["email"] email-sendgrid = ["email", "dep:sendgrid"] jwt = ["dep:jsonwebtoken"] jwt-ietf = ["jwt"] jwt-openid = ["jwt"] cli = ["dep:clap"] otel = ["dep:opentelemetry", "dep:opentelemetry_sdk", "dep:opentelemetry-otlp", "dep:tracing-opentelemetry", "dep:prost"] grpc = ["dep:tonic"] testing = ["dep:insta", "dep:rstest", "dep:testcontainers-modules"] test-containers = ["testing", "dep:testcontainers-modules"] testing-mocks = ["testing", "dep:mockall", "sea-orm?/mock"] config-yml = ["config/yaml"] [dependencies] # Config # We only support `toml` configs currently, and one of the default features (`rust-ini`) pulls in a dependency # that breaks the coverage build on nightly. config = { version = "0.14.1", default-features = false, features = ["toml", "convert-case"] } dotenvy = "0.15.5" # Tracing tracing = { workspace = true } tracing-subscriber = { version = "0.3.17", features = ["env-filter", "json"] } opentelemetry-semantic-conventions = "0.26.0" opentelemetry = { version = "0.26.0", features = ["trace", "metrics", "logs"], optional = true } opentelemetry_sdk = { version = "0.26.0", features = ["tokio", "rt-tokio", "metrics", "logs", "trace"], optional = true } opentelemetry-otlp = { version = "0.26.0", features = ["metrics", "trace", "logs"], optional = true } # Roadster technically doesn't need a direct dependency on `prost`, but we add one here to allow our # `cargo minimal-versions check` check to pass -- `opentelemetry-proto` requires version `0.13.2` or higher # in order to compile -- it fails to compile with `0.13.1` even though its dependencies don't specify `0.13.2`. prost = { workspace = true, optional = true } tracing-opentelemetry = { version = "0.27.0", features = ["metrics"], optional = true } # HTTP APIs # `axum-core` is not optional because we use the `FromRef` trait pretty extensively, even in parts of # the code that wouldn't otherwise need `axum`. axum-core = { workspace = true } axum = { workspace = true, features = ["macros"], optional = true } axum-extra = { workspace = true, features = ["typed-header", "cookie"], optional = true } tower = { workspace = true, optional = true } tower-http = { workspace = true, features = ["trace", "timeout", "request-id", "util", "normalize-path", "sensitive-headers", "catch-panic", "compression-full", "decompression-full", "limit", "cors"], optional = true } aide = { workspace = true, features = ["axum", "redoc", "scalar", "macros"], optional = true } schemars = { workspace = true, optional = true } http-body-util = { version = "0.1.2", optional = true } mime = { workspace = true, optional = true } # DB sea-orm = { workspace = true, features = ["debug-print", "runtime-tokio-rustls", "sqlx-postgres", "macros"], optional = true } sea-orm-migration = { workspace = true, features = ["runtime-tokio-rustls", "sqlx-postgres"], optional = true } # Email lettre = { workspace = true, features = ["serde"], optional = true } sendgrid = { workspace = true, optional = true } # Workers rusty-sidekiq = { workspace = true, optional = true } bb8 = { version = "0.8.0", optional = true } num_cpus = { version = "1.13.0", optional = true } # Rust async tokio = { workspace = true } tokio-util = { workspace = true } async-trait = { workspace = true } # Auth jsonwebtoken = { version = "9.0.0", optional = true } # CLI clap = { workspace = true, features = ["derive", "string"], optional = true } # gRPC tonic = { workspace = true, optional = true } # Testing insta = { workspace = true, optional = true } rstest = { workspace = true, optional = true } testcontainers-modules = { workspace = true, features = ["postgres", "redis"], optional = true } mockall = { workspace = true, optional = true } # Others anyhow = { workspace = true } serde = { workspace = true } serde_derive = { workspace = true } serde_json = { workspace = true } serde_with = { version = "3.7.0", features = ["macros", "chrono_0_4"] } strum = { workspace = true } strum_macros = { workspace = true } itertools = { workspace = true } toml = "0.8.0" url = { version = "2.5.0", features = ["serde"] } uuid = { workspace = true } futures = "0.3.30" futures-core = "0.3.31" chrono = { workspace = true, features = ["serde"] } byte-unit = { version = "5.0.0", features = ["serde"] } convert_case = "0.6.0" const_format = "0.2.32" typed-builder = { workspace = true } num-traits = "0.2.14" validator = { version = "0.19.0", features = ["derive"] } thiserror = { workspace = true } # Add latest version of `time` to resolve a build error on nightly # https://github.com/time-rs/time/issues/681 time = "0.3.36" cfg-if = { workspace = true } reqwest = { workspace = true } [dev-dependencies] cargo-husky = { version = "1.5.0", default-features = false, features = ["user-hooks"] } insta = { workspace = true, features = ["json"] } mockall = { workspace = true } mockall_double = "0.3.1" rstest = { workspace = true } [workspace] members = [".", "examples/*", "book/examples/*", "private/*"] [workspace.dependencies] # Tracing tracing = { version = "0.1.40", features = ["async-await"] } async-trait = "0.1.74" # HTTP APIs aide = { version = "0.13.4", features = ["axum"] } axum-core = "0.4.5" axum = "0.7.5" axum-extra = "0.9.0" tower-http = "0.6.0" tower = "0.5.0" schemars = "0.8.16" mime = "0.3.17" # DB sea-orm = { version = "1.1.0" } sea-orm-migration = { version = "1.1.0" } # Email lettre = "0.11.0" sendgrid = "0.23.0" # CLI clap = { version = "4.3.0", features = ["derive"] } # gRPC tonic = { version = "0.12.3" } prost = { version = "0.13.2" } tonic-build = { version = "0.12.3" } # Sidekiq # Todo: the default `rss-stats` feature has a dependency that currently can't be satisfied (memchr: ~2.3) rusty-sidekiq = { version = "0.11.0", default-features = false } # Testing insta = { version = "1.39.0", features = ["toml", "filters"] } rstest = { version = "0.23.0", default-features = false } testcontainers-modules = { version = "0.11.3" } mockall = "0.13.0" # Others # Todo: minimize tokio features included in `roadster` tokio = { version = "1.39.0", features = ["full"] } # For CancellationToken tokio-util = { version = "0.7.10" } anyhow = "1.0.86" serde = { version = "1.0.185", features = ["derive"] } serde_derive = "1.0.185" serde_json = "1.0.96" strum = "0.26.0" strum_macros = "0.26.0" cfg-if = "1.0.0" vergen = { version = "9.0.0" } vergen-gitcl = { version = "1.0.0" } reqwest = "0.12.8" itertools = "0.13.0" cargo-manifest = "0.15.0" typed-builder = "0.20.0" rand = "0.8.5" thiserror = "2.0.0" uuid = { version = "1.10.0", features = ["v4", "serde"] } chrono = { version = "0.4.34", features = ["serde"] } [package.metadata.docs.rs] # Have docs.rs pass `--all-features` to ensure all features have their documentation built. all-features = true [lints.rust] unexpected_cfgs = { level = "allow", check-cfg = ['cfg(coverage_nightly)'] }