Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Feature Flags

caelix defaults to actix. Disable defaults when selecting Axum or building a broker-only process.

FeatureEnables and exportsCompatibility
actixActix Application, TestApplication, runtime macros, Logging, to_actix_responsemutually exclusive with axum
axumAxum Application, TestApplication, runtime macros, AxumRouterBuilder, to_axum_responsemutually exclusive with actix
socketioSocket.IO types and Application::with_socket_io; selects axumunavailable with Actix
sqlxCompatibility feature; SQLx errors work with ? without enabling itcombines with either runtime
validator#[validate] and validator re-exportcombines with either runtime
configtyped .env/explicit-file loading, Config, ConfigFile, ConfigModule<T, F>, Deserialize, and Validatecombines with either runtime
openapiOpenAPI metadata/config, Swagger UI, controller markersrequires an HTTP runtime to serve docs
uploadsUploadedFile, MultipartForm, upload extractors/configurationcombines with either runtime
microservices-natsmicroservice macros, application/runtime/client, NATS options, Tokio runtime macrosno HTTP runtime required
microservices-redissame shared microservice API plus RedisTransportOptionsno HTTP runtime required; Redis 6.2+
# Default Actix
caelix = "0.0.33"

# Axum
caelix = { version = "0.0.33", default-features = false, features = ["axum"] }

# Actix with request facilities
caelix = { version = "0.0.33", features = ["uploads", "validator", "openapi"] }

# Broker-only process with both transports
caelix = { version = "0.0.33", default-features = false, features = [
  "microservices-nats",
  "microservices-redis",
] }

actix and axum must never be enabled together. socketio selects Axum, so disable defaults. NATS and Redis may be enabled separately or together and may also coexist with one HTTP runtime in a combined process. Generated macro code uses facade-only hidden exports; applications should depend on caelix, not adapter or macro crates directly.