#actix-web #rest #rust

bin+lib serv4rs

serv4rs is a powerful, pragmatic, and extremely fast web framework for Rust

8 releases

0.1.7 Apr 7, 2023
0.1.6 Apr 2, 2023
0.1.4 Mar 30, 2023

#2052 in HTTP server

Download history 29/week @ 2025-02-09 14/week @ 2025-02-16

86 downloads per month

MIT/Apache and LGPL-3.0

1MB
2K SLoC

Rust 1.5K SLoC // 0.1% comments JavaScript 279 SLoC // 0.1% comments

πŸ”₯ serv4rs is a powerful, pragmatic, and extremely fast web framework for Rust

use serv4rs::{reg_router, run};

#[rustfmt::skip]
pub fn config(cfg: &mut actix_web::web::ServiceConfig) {
    reg_router(cfg, "GET", "/1", || async { "Hey there! ε•Šε•Šι€η§―εˆ†ε•¦οΌ›ι€η§―εˆ†ε•¦ 1" }); 
    reg_router(cfg, "GET", "/2", || async { "Hey there! ε•Šε•Šι€η§―εˆ†ε•¦οΌ›ι€η§―εˆ†ε•¦ 2" }); 
    reg_router(cfg, "GET", "/3", || async { "Hey there! ε•Šε•Šι€η§―εˆ†ε•¦οΌ›ι€η§―εˆ†ε•¦ 3" }); 
    reg_router(cfg, "GET", "/4", || async { "Hey there! ε•Šε•Šι€η§―εˆ†ε•¦οΌ›ι€η§―εˆ†ε•¦ 4" });    
}

#[tokio::main]
async fn main() {
    run("serv4rs", config).await
}

Dependencies

~52–70MB
~1.5M SLoC