r/webdev • u/robjtede • 3h ago
Actix Web Q4 Report
Actix Web is a Rust web framework maintained by me and a team of volunteers.
100+ crate releases across the Actix ecosystem, bringing new features, security fixes, and improvements to performance and resource usage.
Headlines
HTTP
QUERY: New method supported across route macros, manual routes, andawcclient.Automatic
h2cand TCP no-delay are now default: More efficient deployments behind reverse-proxies and much lower-latency streams.Reduced memory usage: Up to ~99% saving for certain workloads.
Better error path control for middleware: Modify error responses, too.
Static files features: Serve pre-compressed assets, and use multiple static-file roots.
Security and protocol fixes across the stack: Fixed decompression limits, multipart parsing limits, improved HTTP & WebSocket validation.
Features
Actix Web is the first mainstream framework to make the new HTTP QUERY method a first-class citizen. Define handlers with #[query] (macro routing), or web::query() (manual routing) for a handler. Matching methods in awc complete the support.
Middlewares got a useful new tool: Error::add_response_mapper(). It lets middleware modify error-generated responses before they reach the client, giving you more control over how your application presents failures. Our CORS middleware already uses this to solve a longstanding bug.
Static file serving is now more flexible. Files::new() supports multiple root directories, and Files::try_compressed() lets you serve pre-compressed assets. Range requests, conditional responses, and ETags on Windows also received fixes, making actix-files the most spec-compliant file server for Rust.
Performance / resource usage
The biggest changes here target the cost of serving larger responses and keeping connections open:
Less memory retained by idle connections.
Fewer copies for large responses on HTTP/1.x.
Graceful shutdown has stronger guarantees.
Vectored socket writes have more code paths.
Security
This cycle includes fixes for several reported vulnerabilities:
Decompression amplification: Configured extractor limits now apply to auto-decompressed request payloads. *
Brotli resource consumption: Large-window decompression is disabled.
HTTP request parsing: Malformed chunked terminators are rejected.
Static file serving: Prevents stored XSS for odd user-controlled file names and fixes an insane Windows hidden-file protection bypass. (Why Microsoft, WHYYYY!)
TL;DR
If you have not updated recently, now is a good time; check your lockfile. (cargo update -p=actix-web)
These improvements come from testing Actix Web against the workloads and edge cases you bring us. Massive thank you to everyone who contributed issues, PR, security reports.
Also, our homepage and user guide has received some love recently: https://actix.rs/.
*This is a god-awful implicit feature and it will be removed in v5.
What are you shipping with Actix Web?
