docs.rs failed to build salvo-0.6.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
salvo-0.67.2
🎯 功能
- 基于最新版本的 hyper, tokio;
- 支持 Websocket;
- 支持从多个本地目录映射成一个虚拟目录提供服务;
- 中间件系统支持在句柄之前或者之后运行;
- 简单易用的路由系统:
- 路径参数和和支持正则表达式;
- 树状路由系统;
⚡️ 快速开始
创建一个全新的项目:
添加依赖项到 Cargo.toml
[]
= "0.4"
= { = "1.1", = ["full"] }
在 main.rs
中创建一个简单的函数句柄, 命名为hello_world
, 这个函数只是简单地打印文本 "Hello World".
use *;
async
在 main
函数中, 我们需要首先创建一个根路由, 然后创建一个 Server 并且调用它的 bind
函数:
use *;
async
async
树状路由系统
use *;
async
async
async
async
async
async
async
async
☕ 支持者
Salvo
是一个开源项目,如果想支持本项目, 可以 ☕ 在这里买一杯咖啡.
⚠️ 开源协议
Salvo 项目采用 MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)