Cargo Features

[dependencies]
roadster = { version = "0.7.0-alpha.5", default-features = false, features = ["default-common", "default-diesel", "http", "open-api", "sidekiq", "db-sql", "db-sea-orm", "db-diesel", "db-diesel-postgres", "db-diesel-mysql", "db-diesel-sqlite", "db-diesel-pool", "db-diesel-postgres-pool", "db-diesel-mysql-pool", "db-diesel-sqlite-pool", "db-diesel-pool-async", "db-diesel-postgres-pool-async", "db-diesel-mysql-pool-async", "email", "email-smtp", "email-sendgrid", "jwt", "jwt-ietf", "jwt-openid", "cli", "otel", "grpc", "test-containers", "testing-mocks", "config-yml", "testing"] }
default = db-sea-orm, default-common

These default features are set whenever roadster is added without default-features = false somewhere in the dependency tree.

default-common default default-diesel? = cli, jwt-ietf, open-api, otel, sidekiq
default-diesel = db-diesel-postgres-pool-async, default-common

The same as default, except using diesel as the SQL ORM instead of sea-orm

http open-api?

Enables axum, axum-extra, http-body-util, mime, tower, and tower-http

Affects api::http, service::http, service::Service.http, api::http, error::axum, error::mime, middleware::http, service::http, common::address

open-api default-common = http

Enables aide and schemars

Affects roadster::list_routes, roadster::open_api, health::api_routes, http::docs, http::default_api_routes, ping::api_routes, default_routes::DefaultRoutes.api_schema, default_routes::DefaultRoutes.scalar, default_routes::DefaultRoutes.redoc

sidekiq default-common

Enables bb8, num_cpus, and rusty-sidekiq

rusty-sidekiq:

Workers

Affects context::RedisEnqueue, context::RedisFetch, check::HealthCheck.sidekiq, service::Service.sidekiq, worker::sidekiq, error::sidekiq, check::sidekiq_enqueue, check::sidekiq_fetch, worker::sidekiq

db-sql db-diesel? db-sea-orm

Affects roadster::migrate, app::PreparedApp.migrators, app::PreRunAppState.migrators, app::App.migrators, check::HealthCheck.database, lifecycle::LifecycleHandler.db_migration, lifecycle::LifecycleHandler.db_graceful_shutdown, config::database, config::AppConfig.database, error::db, roadster::migration, lifecycle::db

db-sea-orm default = db-sql

Enables sea-orm and sea-orm-migration

sea-orm:

DB - SeaORM

Affects app::App.sea_orm_connection_options, db::sea_orm, db::sea_orm, migration::sea_orm

db-diesel db-diesel-mysql? db-diesel-pool? db-diesel-pool-async? db-diesel-postgres? db-diesel-sqlite? = db-sql

Diesel
Core Diesel feature

Enables diesel and diesel_migrations

diesel:

DB - Diesel

Affects migration::diesel

db-diesel-postgres db-diesel-postgres-pool? db-diesel-postgres-pool-async? = db-diesel

Core DB backend features

Enables postgres of diesel

Affects context::DieselPgConn

db-diesel-mysql db-diesel-mysql-pool? db-diesel-mysql-pool-async? = db-diesel

Enables mysql of diesel

Affects context::DieselMysqlConn

db-diesel-sqlite db-diesel-sqlite-pool? = db-diesel

Enables sqlite of diesel

Affects context::DieselSqliteConn

db-diesel-pool db-diesel-mysql-pool? db-diesel-postgres-pool? db-diesel-sqlite-pool? = db-diesel

Features to create (non-async) connection pools

Enables r2d2

r2d2 is used for non-async Diesel connection pools

Affects db::diesel

db-diesel-postgres-pool = db-diesel-pool, db-diesel-postgres

Affects context::DieselPgPool

db-diesel-mysql-pool = db-diesel-mysql, db-diesel-pool

Affects context::DieselMysqlPool

db-diesel-sqlite-pool = db-diesel-pool, db-diesel-sqlite

Affects context::DieselSqlitePool

db-diesel-pool-async db-diesel-mysql-pool-async? db-diesel-postgres-pool-async? = db-diesel

Features to create async connection pools

Enables bb8 ^0.8.1 and diesel-async

bb8:

bb8 is use for async Diesel connection pools

Affects database::Database.retry_connection

db-diesel-postgres-pool-async default-diesel? = db-diesel-pool-async, db-diesel-postgres

Enables postgres of diesel-async

Affects context::DieselPgConnAsync, context::DieselPgPoolAsync, db::diesel_pg_async

db-diesel-mysql-pool-async = db-diesel-mysql, db-diesel-pool-async

Enables mysql of diesel-async

Affects context::DieselMysqlConnAsync, context::DieselMysqlPoolAsync, db::diesel_mysql_async

email email-sendgrid? email-smtp?

Enables lettre

Email

Affects config::email, config::AppConfig.email, error::email, check::email

email-smtp = email

Affects email::smtp, email::Email.smtp, check::HealthCheck.smtp, email::smtp

email-sendgrid = email

Enables sendgrid

Affects email::sendgrid, email::Email.sendgrid

jwt jwt-ietf? jwt-openid?

Enables jsonwebtoken

Auth

Affects auth::jwt

jwt-ietf default-common = jwt

Affects jwt::ietf

jwt-openid = jwt

Affects jwt::openid

cli default-common

Enables clap

CLI

Affects api::cli, app::PreparedApp.roadster_cli, app::PreparedApp.app_cli

otel default-common

Enables opentelemetry ^0.27.0, opentelemetry-otlp ^0.27.0, opentelemetry_sdk ^0.27.1, prost, and tracing-opentelemetry ^0.28.0

prost:

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.

Affects tracing::Tracing.service_name, tracing::Tracing.trace_propagation, tracing::Tracing.otlp_endpoint, tracing::Tracing.metrics_export_interval

grpc

Enables tonic

gRPC

Affects service::grpc, service::Service.grpc, error::tonic, service::grpc, common::address

test-containers = testing

Enables testcontainers-modules

Affects database::Database.test_container, config::TestContainer, sidekiq::Redis.test_container

testing-mocks = testing

Enables mockall, mock of optional sea-orm

config-yml

Enables yaml of config

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.

testing test-containers? testing-mocks?

Enables insta and rstest

insta:

Testing

Affects app::init_state