Cargo Features

[dependencies]
loco-rs = { version = "0.4.0", default-features = false, features = ["auth_jwt", "cli", "with-db", "channels", "testing", "all_storage", "storage_aws_s3", "storage_azure", "storage_gcp", "bcrypt"] }
default = auth_jwt, cli, with-db

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

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

Affects app::AppContext.db, app::Hooks.truncate, app::Hooks.seed, boot::run_db, boot::create_app, cli::playground, cli::main, concern::pagination, config::Config.database, views::pagination, loco-rs::doctor, loco-rs::db, loco-rs::model, loco-rs::schema, prelude::model, redis::ping, testing::seed, tests_cfg::db, validation::into_db_error, middleware::auth

channels

Enables socketioxide ^0.10.0

A socket.io server implementation

Affects app::Hooks.register_channels, controller::channels

testing

Enables axum-test

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 aws of object_store ^0.9.0

File Upload

Affects drivers::aws

storage_azure all_storage?

Enables azure of object_store ^0.9.0

Affects drivers::azure

storage_gcp all_storage?

Enables gcp of object_store ^0.9.0

Affects drivers::gcp

Features from optional dependencies

bcrypt implicit feature

Enables bcrypt

bcrypt:

Easily hash and verify passwords using bcrypt