Cargo Features

[dependencies]
roadster = { version = "0.9.0-alpha.4", default-features = false, features = ["http", "open-api", "worker", "worker-sidekiq", "worker-pg", "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", "otel-grpc", "grpc", "test-containers", "testing-mocks", "config-yml", "testing", "bench"] }
default = cli, jwt-ietf, open-api, otel

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

http open-api

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

Affects api::http, service::http, service::Service.http, api::http, error::axum, error::mime, middleware::http, service::http, auth::Auth.jwt, auth::Jwt, auth::JwtClaims, common::address

open-api default = 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.swagger, default_routes::DefaultRoutes.scalar, default_routes::DefaultRoutes.redoc

worker worker-pg? worker-sidekiq?

Enables cron, num_cpus, and rand ^0.9.0, v7 of uuid

Affects service::worker, service::Service.worker, error::worker, check::worker, roadster::worker, service::worker

worker-sidekiq = worker

Enables bb8

bb8 is use for async Diesel connection pools

and rusty-sidekiq

Sidekiq

Affects context::RedisEnqueue, context::RedisFetch, check::HealthCheck.worker_sidekiq, worker::sidekiq, worker::WorkerServiceConfig.sidekiq, error::sidekiq, worker::sidekiq, backend::sidekiq, backend::sidekiq, config::WorkerConfig.sidekiq

worker-pg = db-sql, worker

Enables log and pgmq

pgmq:

Postgres queue

and sqlx and optional sea-orm

sea-orm:

DB - SeaORM

Affects app::App.worker_pg_sqlx_pool_options, check::HealthCheck.worker_pg, worker::pg, worker::WorkerServiceConfig.pg, error::pgmq, worker::pg, backend::pg, backend::pg, config::WorkerConfig.pg, database::Database.statement_log_config, database::StatementLogConfig

db-sql db-diesel? db-sea-orm? worker-pg?

Affects cli::CliState.migrator_registry, roadster::migrate, app::App.migrators, prepare::PreparedApp.migrator_registry, prepare::PreparedAppWithoutCli.migrator_registry, check::HealthCheck.database, lifecycle::LifecycleHandler.db_migration, lifecycle::LifecycleHandler.db_graceful_shutdown, config::database, config::AppConfig.database, db::migration, error::db, roadster::db, lifecycle::db

db-sea-orm = db-sql

Enables log, sea-orm, and sea-orm-migration

Affects app::App.sea_orm_connection_options, migration::sea_orm, db::sea_orm, db::sea_orm, database::Database.statement_log_config, database::StatementLogConfig, sea_orm::create_database

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 db::DieselPgConn

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

Enables mysql of diesel

Affects db::DieselMysqlConn

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

Enables sqlite of diesel

Affects db::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 app::App.diesel_connection_customizer, db::diesel

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

Affects app::App.diesel_pg_connection_customizer, db::DieselPgPool

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

Affects app::App.diesel_mysql_connection_customizer, db::DieselMysqlPool

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

Affects app::App.diesel_sqlite_connection_customizer, db::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 and diesel-async

Affects database::DbPoolConfig.retry_connection

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

Enables postgres of diesel-async

Affects app::App.diesel_pg_async_connection_customizer, db::DieselPgConnAsync, db::DieselPgPoolAsync, db::diesel_pg_async

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

Enables mysql of diesel-async

Affects app::App.diesel_mysql_async_connection_customizer, db::DieselMysqlConnAsync, db::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 ^0.26.0

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

jwt jwt-ietf jwt-openid?

Enables jsonwebtoken

Auth

Affects auth::jwt, auth::Auth.jwt, auth::Jwt, auth::JwtClaims

jwt-ietf default = jwt

Affects jwt::ietf

jwt-openid = jwt

Affects jwt::openid

cli default

Enables clap and tabled

clap:

CLI

Affects api::cli, prepare::PreparedApp.cli, prepare::PreparedAppCli.roadster_cli, prepare::PreparedAppCli.app_cli, error::cli

otel default otel-grpc?

Enables opentelemetry, opentelemetry-otlp, opentelemetry_sdk, and tracing-opentelemetry

Affects tracing::Tracing.service_name, tracing::Tracing.trace_propagation, tracing::Tracing.trace_sampling_ratio, tracing::Tracing.metrics_export_interval, tracing::Tracing.otlp, tracing::Otlp, tracing::OtlpProtocol, tracing::OtlpEndpoint

otel-grpc = otel

Enables grpc-tonic of opentelemetry-otlp

opentelemetry-otlp:

grpc using tonic

grpc

Enables tonic and tonic-reflection

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, regex, and rstest

insta:

Testing

Affects database::Database.temporary_test_db_clean_up, config::testing, config::AppConfig.testing, pg::DbConfig.temporary_test_db_clean_up, sea_orm::create_database

bench

Feature to enable "private" benchmark-only API methods.

Affects worker::Worker.on_complete