In the Rust web framework world, Axum and Salvo are often put side by side. Both are written in Rust, both run on top of hyper, and both are async. But once you’ve built a few real services with each, you’ll realize they aren’t really competing on the same axis at all — they represent two genuinely different worldviews. This article isn’t about putting one above the other (Axum is an excellent framework); it’s about showing how a different abstraction layer leads to a noticeably different developer experience and expressive power.

The Axum version referenced here is 0.8.x. One quick clarification: Axum 0.8 followed matchit 0.8 in switching its path-parameter syntax from :name / *name to {name} / {*name}, which on the surface looks almost identical to Salvo’s. But the real difference has never been “braces vs. colons” — it’s the abstraction model itself.

阅读全文

Actix-web、Rocket 等框架支持这样的写法:

#[get("/users/{id}")]
async fn show(id: web::Path<i32>) -> impl Responder { /* ... */ }

很多人觉得这"很优雅"——一个属性宏挂在函数上方,路径、方法、参数一目了然,像 Spring MVC 的 @GetMapping,像 FastAPI 的 @app.get。每隔一段时间,就有人在 Salvo 的 issue 区问:能不能也加一个 #[get]

Salvo 故意没有采用。本文想认真解释这个决定背后的原因。

阅读全文

在 Rust 的 Web 框架江湖里,Axum 与 Salvo 常常被放在一起比较。两者都用 Rust 写成,都跑在 hyper 之上,都支持异步,但只要写过几个真实业务,你就会发现:它们其实是两种完全不同的"世界观"。本文不是要贬低任何一方——Axum 是一个优秀的框架——而是想说明:当抽象层次不同时,开发体验和表达能力会显著不同。

本文对比的 Axum 版本为 0.8.x。需要先澄清一点:Axum 0.8 跟随 matchit 0.8 把路径参数语法从 :name / *name 改成了 {name} / {*name},看起来与 Salvo 的占位符语法几乎一致。但真正的差异从来不在"花括号还是冒号"这种表层,而在抽象模型本身。

阅读全文

Frameworks like Actix-web and Rocket support writing routes like this:

#[get("/users/{id}")]
async fn show(id: web::Path<i32>) -> impl Responder { /* ... */ }

Many people think this is “elegant” — an attribute macro sits right above the function, and the path, method, and parameters are all visible at a glance, much like Spring MVC’s @GetMapping or FastAPI’s @app.get. Every so often someone files a Salvo issue asking: can we have a #[get] too?

Salvo deliberately doesn’t. This article tries to seriously explain the reasoning behind that decision.

阅读全文

在 Rust Web 开发的酒肆江湖里,有一坛自 2019 年便封坛陈酿的佳酿,它不事张扬,却让懂行的开发者甘愿为之驻足 —— 这便是 Salvo。Salvo 这坛酒,也在近六年的时光里,酿出了独一份的厚重与绵长。

奇妙的是,这坛 “老酒” 却总被误作新酿。只因它从不停歇对新鲜的追求,如同技艺精湛的酿酒师,在坚守传统工艺的同时,总能敏锐捕捉风味的进阶可能。从原生支持 HTTP/2、HTTP/3 协议的前瞻布局,到路由系统的设计创新;从内存占用的持续优化,到中间件系统的革命性统一设计,Salvo 在岁月沉淀中不断焕发新生,每一次版本更新都像给陈酿注入了鲜活气息,既保有老框架的可靠底色,又藏着让人惊喜的新鲜口感。它从不是被时代淘汰的旧物,而是在时光里愈发鲜活的经典。

阅读全文

作者的图片

Chrislearn Young

Super bio with markdown support COOL

Your job title

China