Registry / web-framework / actix-web

actix-web

JSON →
library4.12.1rscratesunverified

Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.

# Cargo.toml [dependencies] actix-web = "4.12.1"
INSTALL
IMPORT
SIG · ACTIX-WEB
A
actix-web
web-frameworkrustv4.12.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

App
use actix_web::App;

Create a simple HTTP server with Actix Web.

use actix_web::{web, App, HttpServer, Responder}; async fn hello() -> impl Responder { "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 }
Debug
Known issues
gotchaUses its own runtime (actix-rt) which may conflict with Tokio
fix
Use #[actix_web::main] instead of #[tokio::main] and avoid mixing runtimes
affects: >=4.0.0
Upgrade
Version history
4.12.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
56 hits · last 30 days
node
48
Resources
actix-web — cargo add actix-web · libregistry