---
name: "actix-web-high-concurrency-actors"
description: "Build ultra-low latency, concurrent web services in Rust using Actix Web."
metadata:
  author: "Actix"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "write actix-web route handler"
  - "share state web::data actix"
  - "actix web json extractor"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Actix Web High-Throughput HTTP Framework for Rust

Architects Actix Web services: App::new(), web::Data application state sharing, extractors (Path, Query, Json), middleware (Logger, DefaultHeaders), asynchronous handlers, and multi-threaded worker pools.

## When to Invoke
Invoke this skill whenever you need to:
- write actix-web route handler
- share state web::data actix
- actix web json extractor

## Execution SOP & Rules
1. Define server: HttpServer::new(|| App::new().app_data(db.clone()).service(get_user)).bind(('0.0.0.0', 8080))?.run().await.
2. Define handler: #[get('/users/{id}')] async fn get_user(path: web::Path<u32>, db: web::Data<Db>) -> impl Responder { ... }.
3. Return typed responses: HttpResponse::Ok().json(user).
4. Tune worker threads matching available CPU cores: HttpServer::new(...).workers(num_cpus::get()).

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
