Cargo Features
[dependencies]
roadster = { version = "0.7.0-beta.4", 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", "otel-grpc", "grpc", "test-containers", "testing-mocks", "config-yml", "testing"] }
- default = db-sea-orm, default-common
-
These default features are set whenever
roadster
is added without
somewhere in the dependency tree.default-features = false - 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 usingdiesel
as the SQL ORM instead ofsea-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
-
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
cli::CliState.migrators
,roadster::migrate
,app::App.migrators
,prepare::PreparedApp.migrators
,prepare::PreparedAppWithoutCli.migrators
,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 default = db-sql
-
Enables sea-orm and sea-orm-migration
sea-orm:
DB - SeaORM
Affects
app::App.sea_orm_connection_options
,migration::sea_orm
,db::sea_orm
,db::sea_orm
,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 featureEnables 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
Affects
db::DieselPgConn
… - db-diesel-mysql db-diesel-mysql-pool? db-diesel-mysql-pool-async? = db-diesel
-
Affects
db::DieselMysqlConn
… - db-diesel-sqlite db-diesel-sqlite-pool? = db-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 ^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
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
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
,prepare::PreparedApp.cli
,prepare::PreparedAppCli.roadster_cli
,prepare::PreparedAppCli.app_cli
… - otel default-common otel-grpc?
-
Enables opentelemetry, opentelemetry-otlp, opentelemetry_sdk, prost, and tracing-opentelemetry
prost:
Roadster technically doesn't need a direct dependency on
prost
, but we add one here to allow ourcargo minimal-versions check
check to pass --opentelemetry-proto
requires version0.13.2
or higher in order to compile -- it fails to compile with0.13.1
even though its dependencies don't specify0.13.2
.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
- config-yml
-
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?
-
insta:
Testing
Affects
sea_orm::create_database
…