| Crates.io | hotaru_meta |
| lib.rs | hotaru_meta |
| version | 0.7.3 |
| created_at | 2025-11-21 15:42:53.950075+00 |
| updated_at | 2026-01-13 16:55:43.104222+00 |
| description | Core macros for Hotaru |
| homepage | |
| repository | https://github.com/Field-of-Dreams-Studio/hotaru |
| max_upload_size | |
| id | 1943732 |
| size | 105,299 |
Procedural macros for the Hotaru web framework, providing declarative syntax for endpoint and middleware definition.
endpoint!Define HTTP endpoints with automatic registration:
use hotaru_meta::endpoint;
endpoint! {
APP.url("/api/users"),
pub handle_users<HTTP> {
text_response("User list")
}
}
Fn-style lets you name the request variable:
use hotaru_meta::endpoint;
endpoint! {
APP.url("/api/users"),
pub fn handle_users(req: HTTP) {
text_response("User list")
}
}
middleware!Define middleware with clean syntax:
use hotaru_meta::middleware;
middleware! {
pub AuthMiddleware<HTTP> {
// Middleware implementation
}
}
Fn-style lets you name the request variable:
use hotaru_meta::middleware;
middleware! {
pub fn AuthMiddleware(req: HTTP) {
// Middleware implementation
}
}
This crate is automatically included when using the Hotaru framework. You typically don't need to add it directly.
GPL-3.0 License
This is the macro crate for the Hotaru web framework.
Learn more: https://fds.rs