| Crates.io | rustapi-macros |
| lib.rs | rustapi-macros |
| version | 0.1.207 |
| created_at | 2025-12-30 14:45:43.34756+00 |
| updated_at | 2026-01-26 00:01:41.83882+00 |
| description | Procedural macros for RustAPI. Includes #[get], #[post], #[derive(Schema)], and #[derive(Validate)] for compile-time magic. |
| homepage | https://github.com/Tuntii/RustAPI |
| repository | https://github.com/Tuntii/RustAPI |
| max_upload_size | |
| id | 2012756 |
| size | 64,220 |
Procedural macros that power the RustAPI developer experience.
ℹ️ Note: These macros are re-exported by
rustapi-rs. You do not need to add this crate manually.
#[rustapi::main]Replaces #[tokio::main]. Sets up the runtime, tracing subscriber, and other framework essentials.
Registers a function as a route handler.
#[rustapi::get("/users/{id}")]#[rustapi::post("/users")]#[rustapi::put("/users/{id}")]#[rustapi::delete("/users/{id}")]#[rustapi::patch("/users/{id}")]#[rustapi::head("/health")]#[rustapi::options("/cors")]Enrich your auto-generated documentation.
#[rustapi::tag("Auth")]: Groups endpoints.#[rustapi::summary("Logs in a user")]: Brief summary.#[rustapi::description("Full markdown description...")]: Detailed docs.#[derive(Schema)]Generates a JSON Schema for the struct, used by rustapi-openapi.
Wraps utoipa::ToSchema via rustapi-openapi integration.
#[derive(Validate)]Generates validation logic.
Wraps validator::Validate via rustapi-validate integration.