Expand description
§Ultimo - Modern Rust Web Framework
Lightweight, type-safe Rust web framework with automatic TypeScript type generation.
§Quick Start
use ultimo::prelude::*;
#[tokio::main]
async fn main() -> ultimo::Result<()> {
let mut app = Ultimo::new();
app.use_middleware(ultimo::middleware::builtin::logger());
app.get("/", |ctx: Context| async move {
ctx.json(serde_json::json!({"message": "Hello Ultimo!"})).await
});
app.get("/users/:id", |ctx: Context| async move {
let id = ctx.req.param("id")?;
ctx.json(serde_json::json!({"id": id})).await
});
app.listen("127.0.0.1:3000").await
}Re-exports§
pub use app::Ultimo;pub use context::Context;pub use error::Result;pub use error::UltimoError;pub use rpc::RpcRegistry;pub use rpc::RpcRequest;pub use rpc::RpcResponse;pub use validation::validate;
Modules§
- app
- Main Ultimo application
- context
- Request/Response context for handling HTTP requests and responses
- error
- Error handling system for Ultimo
- handler
- Handler traits and types for async request handling
- middleware
- Middleware system with composable chain execution
- openapi
- OpenAPI specification generation for Ultimo
- prelude
- Prelude module for convenient imports
- response
- HTTP response builder and utilities
- router
- Fast HTTP router with path parameter support
- rpc
- RPC (Remote Procedure Call) system for Ultimo
- validation
- Validation helpers for request data