Actix Web (Rust)
Build blazing-fast HTTP backends in Rust with Actix Web. Covers async handlers, extractors, middleware, shared app state, JSON APIs, error handling, and Tokio-based concurrency for high-throughput, memory-safe services.
This skill helps you ship production Rust web services with Actix Web. It designs typed request extractors and responders, wires middleware and guards, manages shared application state and connection pools, models JSON REST endpoints, handles errors idiomatically with Result types, and tunes the Tokio runtime for high concurrency and low latency.
When to use
Use when building HTTP backends or REST APIs in Rust with Actix Web — async handlers, extractors, middleware, app state, JSON serialization, or high-throughput service tuning.
Examples
JSON REST endpoint
Typed handler with extractors
Build an Actix Web POST /users endpoint that deserializes a JSON body with an extractor, validates it, writes to a Postgres pool in app state, and returns 201 with the created record
Auth middleware
Guard protected routes
Add Actix Web middleware that checks a Bearer token, rejects unauthenticated requests with 401, and injects the user id into request extensions