Actix Web is a Rust library for building HTTP servers and services. It targets high throughput and low latency for web APIs and sites.
Overview
Actix Web lets Rust developers define routes, handlers, and middleware to serve HTTP traffic. Incoming requests are matched by path and method, then processed by async handlers that return typed responses.
The stack supports HTTP/1.x and HTTP/2, streaming, pipelining, keep-alive, and slow-request handling. Routing can use macros or explicit resource definitions. Client and server WebSockets are supported, along with transparent compression (brotli, gzip, deflate, zstd), multipart uploads, and static file serving.
TLS can use OpenSSL or Rustls. Built-in and ecosystem middleware covers logging, sessions, CORS, and related concerns. Request data can be extracted from JSON, forms, query strings, headers, auth tokens, and multipart bodies. Related crates add TLS, WebSockets, server-sent events, sessions, static files, and observability hooks.
The project marks some capabilities as experimental for faster iteration; those may change between releases. It is widely used in production and cited in independent HTTP benchmarks.
Key features
- HTTP/1.x and HTTP/2 support
- Macro and manual routing
- WebSocket client and server
- Content compression
- Multipart stream handling
- Static asset serving
- OpenSSL or Rustls TLS
- Middleware ecosystem
Use cases
- Rust HTTP APIs
- High-throughput web services
- WebSocket backends
- JSON and form APIs
- Static plus dynamic sites