hero

Salvo is a powerful and simplest web server framework in Rust world

Get Started Donate

Simplicity First

You just need the basic knowledge of Rust, you can write a powerful and efficient server, which is comparable to the development speed of some Go web server frameworks.

Powerful features

Although it is simple, it is still powerful, with built-in Multipart, extract data from request, etc., which can meet the needs of most business scenarios.

Performance

Thanks to the performance advantages of Rust, you can write extremely high-performance server-side applications very easily.

Chainable tree router

Chainable tree routing system let you write routing rules easily and chains. You can use regex to constraint parameters.

Middlewares

Flexible plugin API, allowing plugins to provide lots of plug-and-play features for your site.

Stable after online

Rust's extremely secure mechanism allows you to have no worries after your website is online. You have more time to enjoy your life!

Hello world!

use salvo::prelude::*;

#[handler]
async fn hello_world(res: &mut Response) {
    res.render("Hello world!");
}
#[tokio::main]
async fn main() {
    let router = Router::new().get(hello_world);
    Server::new(TcpListener::bind("127.0.0.1:7878")).serve(router).await;
}
[package]
name = "example-hello"
version = "0.1.0"
edition = "2021"
publish = false

[dependencies]
salvo = { version = "0.37" }
tokio = { version = "1", features = ["macros"] }