#actix-web #diesel #actix

serwus

Helpers for building actix-web/diesel based services

7 releases

Uses new Rust 2024

0.2.3 Jan 23, 2026
0.2.2 Oct 25, 2025
0.2.1 Feb 4, 2025
0.2.0 Apr 22, 2024
0.1.0 Sep 26, 2023

#747 in HTTP server

Download history 25/week @ 2025-10-28 14/week @ 2025-11-04 39/week @ 2025-12-02 1/week @ 2025-12-09 35/week @ 2025-12-16 4/week @ 2025-12-23 23/week @ 2025-12-30 112/week @ 2026-01-06 245/week @ 2026-01-13 223/week @ 2026-01-20 84/week @ 2026-01-27 30/week @ 2026-02-03 76/week @ 2026-02-10

485 downloads per month

MIT/Apache and maybe GPL-3.0-or-later

93KB
2.5K SLoC

Serwus

Helpers for building actix-web/diesel based services.

crates.io Documentation MIT or Apache 2.0 licensed Dependency Status CI downloads

Features

  • MultiPool - Master/replica-aware wrapper for r2d2
  • StatsPresenter - Framework for readiness and statistics reporting
  • JsonError - Middleware that makes actix-web return errors as JSONs

Example

use actix_web::web;
use serwus::{
    server::{Serwus, default_cors},
    EmptyStats
};

#[derive(Clone, EmptyStats)]
pub struct AppData;

async fn hello() -> &'static str {
    "Hello world\n"
}

#[actix_web::main]
async fn main() -> std::io::Result<()> {
    let prepare_app_data = || AppData;

    Serwus::default()
        .start(
            prepare_app_data,
            |app| {
                app.route("/", web::get().to(hello));
            },
            default_cors,
        )
        .await
}

Dependencies

~23–55MB
~809K SLoC