vantus
vantus is a macro-first async Rust web platform built around:
HostBuilderfor bootstrapping#[module]and#[controller]for application structure- typed extraction for path/query/body/config/service inputs
- a lightweight DI container with singleton/scoped/transient lifetimes
- layered configuration binding
- an async runtime powered by
tokioandhyper
Version 0.2.0 is a breaking macro-only release. Manual route construction and direct router registration are no longer part of the supported public application API.
Quick start
use ;
use Serialize;
;
;
async
See examples/macro_controller.rs and src/main.rs.
Supported authoring model
- Use
HostBuilderto configure files/env/profile loading and mount macro-defined modules. - Use
#[module]for service registration, lifecycle hooks, and module route groups. - Use
#[controller]for route-focused types when you want a separate controller abstraction. - Use typed inputs like
Path<T>,Query<T>,TextBody,JsonBody<T>,Service<T>,Config<T>, andAppConfig.
Extraction model
The supported extraction inputs are:
RequestContextPath<T>Query<T>QueryMapTextBodyBodyBytesJsonBody<T>Service<T>Config<T>- any
T: FromConfiguration
Configuration
ConfigurationBuilder merges:
application.propertiesapplication.{profile}.properties- environment variables using the configured prefix, default
APP_
AppConfig provides the built-in production settings for:
- service name
- environment and profile
- info/readiness toggles
- server address
- request timeout
- graceful shutdown timeout
- max request bytes
- concurrency limit
Default platform module
WebPlatformModule provides a production-oriented starter set:
/health/info- request logging
- panic recovery middleware
Production notes
- This crate is async-first and intended to run on
tokio. - The public app-facing API is macro-first; internal routing primitives are reserved for framework internals and proc-macro expansion.
0.2.0is a breaking pre-1.0 release. See docs/migration-to-macros.md and CHANGELOG.md.
Verification
Release checks: