Plugins & features overview
Everything below is opt-in. Core routing and handlers work with zero features. Enable only what you need.
Plugin crates (via churust features)
| Page | Feature | Install API |
|---|---|---|
| JSON | json | ContentNegotiation, Json<T> |
| Logging | logging | CallLogging |
| CORS | cors | Cors |
| Auth | auth | Auth::bearer / basic / jwt |
| Rate limit | ratelimit | RateLimit |
| Compression | compression | Compression |
| Templates | templates | Templates + Renderer |
| Redis | redis | RedisStore |
| Client | client | Client |
| OpenAPI | openapi | OpenApi |
features = ["full"] enables: json, logging, cors, auth, ratelimit,
compression, templates.
Transport / core features
| Page | Feature |
|---|---|
| WebSockets | ws |
| Static files & streaming | fs (+ always-on Body) |
| Multipart | multipart |
| TLS | tls |
| HTTP/3 | http3 |
Pattern
churust = { version = "0.3", features = ["json", "auth"] }
#![allow(unused)] fn main() { use churust::prelude::*; Churust::server() .install(/* plugins */) .routing(|r| { /* routes that use extractors from those plugins */ }) }
Full matrix: Feature flags.