Registry / web-framework / actix-web-codegen

actix-web-codegen

JSON →
library4.3.0rscratesunverified

Routing and runtime macros for Actix Web, providing compile-time code generation.

# Cargo.toml [dependencies] actix-web-codegen = "4.3.0"
INSTALL
IMPORT
SIG · ACTIX-WEB-CODEGEN
A
actix-web-codegen
web-frameworkrustv4.3.0
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.

route
use actix_web_codegen::route;

Defines a route handler using the route macro from actix-web-codegen.

use actix_web_codegen::route; use actix_web::{App, HttpServer, HttpResponse}; #[route("/", method = "GET")] async fn index() -> HttpResponse { HttpResponse::Ok().body("Hello!") } #[actix_web::main] async fn main() -> std::io::Result<()> { HttpServer::new(|| App::new().service(index)) .bind("127.0.0.1:8080")? .run() .await }
Debug
Known issues
gotchaRequires the actix-web runtime; not compatible with other async runtimes.
fix
Use #[actix_web::main] or run within an actix-web system.
affects: >=4.0.0
Upgrade
Version history
4.3.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
32 hits · last 30 days
node
26
OpenAI (training)
2
Amazon
1
Resources
actix-web-codegen — cargo add actix-web-codegen · libregistry