Skip to content

za-songguo/website

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

home title heroImage heroText actions features footer
true
Home
/images/logo-text.svg
text link type
Get Started
/book/guide.md
primary
text link type
Donate
/donate.md
secondary
title details
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.
title details
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.
title details
Performance
Thanks to the performance advantages of Rust, you can write extremely high-performance server-side applications very easily.
title details
Chainable tree router
Chainable tree routing system let you write routing rules easily and chains. You can use regex to constraint parameters.
title details
Middlewares
Flexible plugin API, allowing plugins to provide lots of plug-and-play features for your site.
title details
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!
MIT Licensed | Copyright © 2019-present Salvo Team

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"] }

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 94.3%
  • Vue 4.4%
  • Other 1.3%