{{ partial "header" . }}
A powerful, pragmatic, and extremely fast web framework for Rust
Get StartedForget about stringly typed objects, from request to response, everything has types.
Out of the box logging, body compression, static file serving, TLS, HTTP/2, and much more.
Easily create and share reusable components for any Actix Web application.
Actix Web is blazingly fast. Don't take our word for it -- see for yourself!
Handler functions in Actix Web can return a wide range of objects that
implement the Responder
trait. This makes it a breeze
to return consistent responses from your APIs.
Actix Web comes with a powerful extractor system that extracts parts of the incoming HTTP request and passes it to your handler functions.
A handler function can receive up to 12 arguments that implement the
FromRequest
trait, in any order, and Actix Web will automatically extract
them from the request and provide them. It feels like magic!
Handling multipart/urlencoded form data is easy. Just define a structure that can be deserialized and Actix Web will handle the rest.
{{ highlight `use actix_web::web::{Either, Json, Form}; #[derive(Deserialize)] struct Register { username: String, country: String, } // register form is JSON async fn register(form: web::JsonThe built-in Actix Web request router can be used with or without macros attached to handlers, and always provides flexible and composable methods of creating routing tables.
Includes support for matching dynamic path segments, path prefix groups, and custom routing guards which let you define your own rules.
{{ highlight `#[get("/")] async fn index(_req: HttpRequest) -> impl Responder { "Hello from the index page!" } async fn hello(path: web::Path