Actix Web Documentation

website·Indexed Apr 11, 2026

https://actix.rs/docs/

Official documentation for Actix Web, a high-performance Rust web framework. Includes guides for getting started, routing, middleware, extractors, and error handling. Covers the underlying Actix actor system, concurrency primitives like Arbiter and SyncArbiter, and integration with databases and cloud platforms like Shuttle. Features reference for HTTP/2, TLS configuration, static file serving, and connection lifecycle management within the actix-web and actix crates.

Tokens
6.6K
Snippets
26
Records
71
Agent score
50%

What's inside Actix Web

  1. Community Crates Overview

    This page lists third-party crates maintained by the community that extend the Actix Web ecosystem. These crates are not affiliated with the Actix project, which provides no warranty or support for them. To add a crate to this list, submit a pull request to the actix/actix-website repository.
  2. Error type automatic conversion

    Actix Web automatically converts any error implementing ResponseError into its Error type. When a handler returns a Result<T, E> where E implements ResponseError, the Responder implementation coerces it into an HTTP response with the appropriate status code.
    impl<T: Responder, E: Into<Error>> Responder for Result<T, E>
  3. SyncArbiter overview and use cases

    SyncArbiter launches multiple instances of a single Actor type across a pool of OS threads. Use it for CPU-bound or highly concurrent workloads where you need parallel processing. A SyncArbiter can only host a single type of Actor—you'll need a separate SyncArbiter for each Actor type you want to run this way.
  4. Connection Lifecycle Overview

    Actix Web uses three main components to process client connections: Accept loop, Worker loop, and Request/Dispatcher loop. After the server starts listening to sockets, Accept and Worker loops handle incoming connections. Once a connection is accepted, application-level protocol processing happens in a protocol-specific Dispatcher loop spawned from Worker. Note: diagrams in documentation show happy-path scenarios only.
  5. Actix Web extractors overview

    Actix Web provides type-safe request information access through extractors implementing FromRequest. Handlers support up to 12 extractors as arguments. Argument position generally doesn't matter, but if an extractor reads the request body, only the first such extractor will succeed. For fallback behavior (e.g., JSON or raw bytes), use Either<Json<T>, Bytes>.
  6. Actix Web request handler basics

    A request handler in Actix Web is an async function that accepts zero or more parameters implementing FromRequest (extracted from the HTTP request) and returns a type implementing Responder (convertible to HttpResponse). The handler execution has two stages: first the handler returns a Responder, then respond_to() is called on it to convert to HttpResponse or Error.
  7. Arbiter overview and purpose

    Arbiter provides an asynchronous execution context for Actors, functions, and futures. While an Actor contains a Context that defines its Actor-specific execution state, Arbiters host the environment where actors run. Arbiters can spawn new OS threads, run event loops, spawn tasks asynchronously on that event loop, and act as helpers for asynchronous tasks.
  8. Actor communication model in Actix Web

    Actors in Actix Web communicate exclusively by exchanging messages. They cannot be referenced directly, only through their addresses. The Actor trait provides helper methods to obtain these addresses, enabling optional synchronous or asynchronous response waiting.