Crate rapid_rs

Crate rapid_rs 

Source
Expand description

§rapid-rs

Zero-config, batteries-included web framework for Rust. FastAPI meets Spring Boot, powered by Axum.

§Quick Start

use rapid_rs::prelude::*;

#[tokio::main]
async fn main() {
    App::new()
        .auto_configure()
        .run()
        .await
        .unwrap();
}

§With Authentication

use rapid_rs::prelude::*;
use rapid_rs::auth::{AuthConfig, auth_routes};

#[tokio::main]
async fn main() {
    let auth_config = AuthConfig::from_env();
     
    App::new()
        .auto_configure()
        .mount(auth_routes(auth_config))
        .run()
        .await
        .unwrap();
}

Re-exports§

pub use app::App;
pub use error::ApiError;
pub use error::ApiResult;
pub use extractors::ValidatedJson;

Modules§

app
auth
Authentication and Authorization module for rapid-rs
config
error
extractors
prelude
Convenient re-exports for common types