Cargo Features
[dependencies]
socle = { version = "3.4.0", default-features = false, features = ["dotenv", "rfc-types", "telemetry", "database", "ratelimit", "ratelimit-memory", "nats", "openapi", "validation", "cursor", "http-client", "metrics", "testing-postgres", "test-util", "testing"] }
- default = database, dotenv, openapi, ratelimit-memory, rfc-types, telemetry
-
These default features are set whenever
socleis added withoutsomewhere in the dependency tree.default-features = false - dotenv default
-
Enables dotenvy
- rfc-types default
-
Enforce RFC-oriented api-bones response types at compile time.
When enabled (the default), handler success responses must be constructed via the socle builder functions (ok, created, created_at, created_under,
listed, listed_page, etagged). Direct tuple construction of Ok arms is rejected by the compiler. Disable only during a migration window; document the reason. Use UnconstrainedResponse for per-handler opt-outs instead.Affects
handler_error::created,handler_error::created_at,handler_error::created_under,handler_error::ok,handler_error::listed,handler_error::etagged,testing::handler_assert… - telemetry default
-
Affects
ports::telemetry… - database default
-
Enables sqlx ^0.8
- ratelimit ratelimit-memory
-
Affects
rate_limit::RateLimitBackend,rate_limit::RateLimitExtractor… - ratelimit-memory default = ratelimit
-
Enables governor
Affects
rate_limit::RateLimitLayer,rate_limit::RateLimitService… - nats
-
Enables async-nats ^0.47 and metrics ^0.23
- openapi default
-
Enables utoipa and utoipa-swagger-ui
Affects
socle::openapi… - validation
-
Enables validator
- cursor
-
api-bones:
Enables
serde::base64_bytes—Vec<u8>↔ Base64 string serde helpers. Requiresalloc. - http-client
-
Enables async-trait, http, opentelemetry ^0.31, reqwest, and reqwest-middleware
Affects
socle::http_client… - metrics
-
Enables opentelemetry ^0.31, opentelemetry-prometheus ^0.31, opentelemetry_sdk ^0.31, and prometheus
Affects
socle::metrics… - testing-postgres
-
Enables sqlx ^0.8, testcontainers, and testcontainers-modules
Affects
testing::postgres… - test-util
- testing
-
Enables reqwest
Affects
socle::testing,testing::app,testing::trace…