Cargo Features
[dependencies]
loco-rs = { version = "0.14.1", default-features = false, features = ["auth_jwt", "cli", "with-db", "testing", "all_storage", "storage_aws_s3", "storage_azure", "storage_gcp", "cache_inmem", "bg_redis", "bg_pg", "bg_sqlt", "integration_test"] }
- default = auth_jwt, bg_pg, bg_redis, bg_sqlt, cache_inmem, cli, with-db
-
These default features are set whenever
loco-rs
is added without
somewhere in the dependency tree.default-features = false - auth_jwt default
-
Enables jsonwebtoken
Affects
auth::jwt
,middleware::auth
… - cli default
-
Enables clap
Affects
loco-rs::cli
… - with-db default
-
Enables sea-orm and sea-orm-migration, with-db of loco-gen
Affects
app::AppContext.db
,app::Hooks.truncate
,app::Hooks.seed
,boot::run_db
,boot::create_app
,cli::playground
,cli::main
,config::Config.database
,views::pagination
,doctor::check_db
,env_vars::POSTGRES_DB_OPTIONS
,initializers::extra_db
,initializers::multi_db
,loco-rs::db
,loco-rs::model
,loco-rs::schema
,prelude::model
,testing::db
,tests_cfg::db
,validation::into_db_error
… - testing
-
Enables axum-test and scraper ^0.21.0
Affects
loco-rs::testing
,loco-rs::tests_cfg
,email_sender::Deliveries
… - all_storage = storage_aws_s3, storage_azure, storage_gcp
-
Storage features
- storage_aws_s3 all_storage?
-
Enables services-s3 of opendal ^0.50.2
File Upload
Affects
drivers::aws
… - storage_azure all_storage?
-
Enables services-azblob of opendal ^0.50.2
Affects
drivers::azure
… - storage_gcp all_storage?
-
Enables services-gcs of opendal ^0.50.2
Affects
drivers::gcp
… - cache_inmem default
-
Cache feature
Enables moka
cache
Affects
drivers::inmem
… - bg_redis default
-
Enables bb8 ^0.8.1 and rusty-sidekiq ^0.11.0
rusty-sidekiq:
bg_redis: redis workers
Affects
bgworker::skq
… - bg_pg default
-
sqlx:
bg_sqlt: sqlite workers
bg_pg: postgres workersAffects
bgworker::pg
,queue::postgres_seed_data
,tests_cfg::queue
… - bg_sqlt default
-
Affects
bgworker::sqlt
,queue::sqlite_seed_data
,tests_cfg::queue
… - integration_test
-
Testing feature flags