Skip to main content
ActixWeb Logo

ActixWeb

Learn, understand, and build with Actix Web — the powerful, pragmatic, and extremely fast web framework for Rust.

shield

Type Safe

From request to response, everything has types. Forget about stringly typed objects.

bolt

Blazingly Fast

Consistently top-ranked in TechEmpower benchmarks. 2M+ requests/sec under load.

memory

Tokio Native

Built on Tokio's async runtime with full ecosystem interop. Zero runtime GC.

extension

Extensible

Powerful middleware, extractors, and app-data system. Build your own libraries easily.

Hello World

Getting started with Actix Web is simple. Define a handler and bind it to a route.

src/main.rs
use actix_web::{get, web, App, HttpServer, Responder};
 
#[get("/")]
async fn index() -> impl Responder {
"Hello, World!"
}
 
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| App::new().service(index))
.bind(("127.0.0.1", 8080))?
.run()
.await
}

ActixWeb.com is an independent learning and documentation platform for the Actix Web framework. Not affiliated with the official project.