Salvo: Rust web framework for “composable engineering structures”

Salvo is a simple yet powerful Rust web framework that allows you to quickly build modern servers that support HTTP/1–3 and WebSocket/WebTransport protocols, even if you only have basic Rust knowledge. The framework is built on Hyper and Tokio, adopts a unified processor/middleware model, is equipped with an infinitely nestable, chained call routing system (which can clearly divide public and private route groups), and also has built-in multi-part form/file upload, data extraction functions, can automatically generate OpenAPI documents, supports TLS certificate configuration for ACME protocol, and provides command-line tools (CLI) for quickly building project frameworks. With Salvo, you can quickly prototype and deploy high-performance, high-security backends with less boilerplate code, simpler routing configuration, easier testing processes, and API document management.

In the Rust ecosystem, web frameworks are always “fast” and “simple”, but there are not many frameworks that truly design systems around engineering structure, maintainability, and type safety.
Salvo is just one such project.

It doesn’t try to complete the demo with minimal code, but explicitly targets a problem:

How to build long-term maintainable, well-structured, and reliable web services in Rust?

Another Rust web framework?

If you’ve been exposed to the Rust web ecosystem, you’ve probably seen these issues:

  • Routing, parameters, and verification are scattered everywhere
  • It is difficult to track the execution sequence after the middleware is stacked
  • The project is large, and the logical structure begins to “collapse”
  • Handler and infrastructure are strongly coupled and difficult to reuse

Salvo was not designed to solve the question of whether or not you can write a web service.
It is to answer a more engineering question:

Can web requests be modeled as a clear, composable, type-safe processing chain?

Everything is Handler, everything can be combined

Salvo’s core abstraction is very straightforward:

  • Every step of the request processing is a Handler
  • Handlers can be combined, nested, and reused like functions

This means:

  • Routing ≠ controller
  • Middleware ≠ special mechanisms
  • Verification/authentication/logging are just one link in the processing chain

In Salvo, you are not “stuffing logic into the frame”,
Instead, it is building an explicit request flow.

Strong types are not “pluses”, but basic premises

Salvo makes deep use of Rust’s type system:

  • Path / Query / Body can all be mapped directly to structs
  • The validation logic can be done at the type layer
  • Many bugs are eliminated at compile time

The experience is very close to the “backend version of the strongly typed DSL”:

  • You are describing a data structure
  • The framework is responsible for constraints and connections

This approach is closer to “engineering tools” than “scripting tools” than to web frameworks that report errors at runtime.

Middleware is not magic, but explicit structure

In many frames, middleware is like an “invisible fog”:

  • The order depends on memory
  • Behavior depends on documentation
  • Debug is a guess

Salvo deliberately avoids this design.

Middleware in Salvo:

  • is a normal Handler
  • There is a clear combination position
  • It can be locally effective rather than global pollution

This allows complex services to remain structurally readable, traceable, and reconfigurable.

Async is just the foundation, not the selling point

Salvo is based on Tokio’s async/await system:

  • High concurrency I/O is supported
  • Zero-cost abstraction
  • The performance cap is determined by Rust, not the framework itself

But it doesn’t take “performance” as the only selling point.
Compared to extreme Benchmark, Salvo focuses more on:

When the service runs for a year and the code increases tenfold, can it still be understood?

What kind of projects is Salvo suitable for?

In terms of positioning, Salvo is better suited for:

  • Medium to large Web API projects
  • Microservices / internal services
  • Projects that require long-term maintenance
  • A team or individual with requirements for structure, type, security

If you just want to “quickly build an interface”, it may not be the least laborious option.
But if you want the code itself to be like a design document, Salvo is very handy.

A more accurate analogy

Rather than saying that Salvo is:

“Another Rust Web Framework”

It is better to say that it is more like:

Think of Web services as a composable, reasonable data processing pipeline

This is also where it is most valuable.

Github:https://github.com/salvo-rs/salvo
Tubing:

Scroll to Top