← ClaudeAtlas

actix-weblisted

Actix-web Rust web framework. Covers routing, extractors, middleware, state management, and WebSocket. Use for high-performance Rust APIs. USE WHEN: user mentions "actix-web", "actix", "rust web framework", "rust api", asks about "rust async web", "actix middleware", "actix extractors", "rust websocket", "high performance rust api" DO NOT USE FOR: Axum projects - use `axum` instead, Rocket projects - use `rocket` instead, Warp projects - use `warp` instead, non-Rust backends
claude-dev-suite/claude-dev-suite · ★ 33 · AI & Automation · score 80
Install: claude install-skill claude-dev-suite/claude-dev-suite
# Actix-web Core Knowledge > **Full Reference**: See [advanced.md](advanced.md) for custom timing middleware, authentication middleware, custom error types, WebSocket actors, and graceful shutdown patterns. > **Deep Knowledge**: Use `mcp__documentation__fetch_docs` with technology: `actix-web` for comprehensive documentation. ## Basic Setup ```toml # Cargo.toml [dependencies] actix-web = "4" actix-rt = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" tokio = { version = "1", features = ["full"] } ``` ```rust use actix_web::{web, App, HttpServer, HttpResponse, Responder}; async fn hello() -> impl Responder { HttpResponse::Ok().body("Hello, World!") } #[actix_web::main] async fn main() -> std::io::Result<()> { HttpServer::new(|| { App::new() .route("/", web::get().to(hello)) }) .bind("127.0.0.1:8080")? .run() .await } ``` ## Route Macros ```rust use actix_web::{get, post, web, HttpResponse, Responder}; #[get("/users/{id}")] async fn get_user(path: web::Path<u32>) -> impl Responder { let id = path.into_inner(); HttpResponse::Ok().json(serde_json::json!({ "id": id })) } #[post("/users")] async fn create_user(body: web::Json<CreateUser>) -> impl Responder { HttpResponse::Created().json(body.into_inner()) } // Register with App App::new() .service(get_user) .service(create_user) ``` ## Extractors | Extractor | Purpose | |-----------|---------| | `web::Path<T>` | URL path parameters |