{"id":76048,"library":"actix-web-codegen","title":"Actix Web Codegen","description":"Routing and runtime macros for Actix Web, providing compile-time code generation.","status":"active","version":"4.3.0","language":"rust","source_language":null,"source_url":"https://github.com/actix/actix-web","tags":["actix","web","macros","routing"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nactix-web-codegen = \"4.3.0\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add actix-web-codegen","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"route","correct":"use actix_web_codegen::route;"}],"quickstart":{"code":"use actix_web_codegen::route;\nuse actix_web::{App, HttpServer, HttpResponse};\n\n#[route(\"/\", method = \"GET\")]\nasync fn index() -> HttpResponse {\n    HttpResponse::Ok().body(\"Hello!\")\n}\n\n#[actix_web::main]\nasync fn main() -> std::io::Result<()> {\n    HttpServer::new(|| App::new().service(index))\n        .bind(\"127.0.0.1:8080\")?\n        .run()\n        .await\n}","lang":"rust","description":"Defines a route handler using the route macro from actix-web-codegen."},"warnings":[{"fix":"Use #[actix_web::main] or run within an actix-web system.","message":"Requires the actix-web runtime; not compatible with other async runtimes.","severity":"gotcha","affected_versions":">=4.0.0"}],"env_vars":null,"search_vec":"'actix':1,9,17 'code':15 'codegen':3 'compil':13 'compile-tim':12 'generat':16 'macro':7,19 'provid':11 'rout':4,20 'runtim':6 'time':14 'web':2,10,18","created_at":"2026-06-17T19:24:11.540014+00:00","updated_at":"2026-06-17T19:24:11.540014+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://actix.rs","github":"https://github.com/actix/actix-web","docs":"https://docs.rs/actix-web-codegen/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}