pub fn build_runtime(cfg: Arc<Config>) -> Result<Runtime>Expand description
Build the hot-swappable Runtime from a fully-resolved Config: the rate limiters
(global per-IP, per-route, per-key), the auth engine, and the parsed size/timeout limits.
Errors if any size/rate/auth setting is invalid, so a bad config fails fast — at startup
or on reload — rather than per-request. The HTTP client and metric registry live outside
the runtime (in AppState) so a reload preserves the connection pool and counters.