TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Choosing the Right Rust Web Framework: An Overview

53 点作者 thecupisblue超过 1 年前

9 条评论

mgomez超过 1 年前
I&#x27;ve spent the last several weeks porting a backend I had written in Go over to Rust (using Axum) and so far so good. But I don&#x27;t know if I can call things in the Rust world like Axum&#x2F;Actix&#x2F;etc. &quot;frameworks&quot; anymore considering all the time I&#x27;ve had to spend researching&#x2F;vetting crates to get the same functionality that comes out of the box in Spring&#x2F;ASP.net&#x2F;Django&#x2F;etc.<p>Take handling datetimes for example. Do I use <i>time</i> or <i>chrono</i>? The initial developer&#x2F;maintainer of <i>chrono</i> left[1] and for the longest time the crate was unmaintained while a CVE remained open[2] until a new maintainer finally came along and addressed it (I think?). All right, so, <i>time</i> it is then... but it uses its own custom format specifiers[3] that I had to get used to coming from the more familiar strftime used by other languages.<p>Or how about input&#x2F;form validation. One of the most popular crates for that, <i>validator</i>, had its maintainer admit that they don&#x27;t even use it themselves?[4] Of course I can already hear people yelling at me, &quot;well, why don&#x27;t you contribute then?!&quot;, and I certainly would love to if I could! But I have to finish what&#x27;s in front of me first.<p>That being said, I still very much enjoy using Rust. Maybe less so for web-related projects. I just have to stay on an even keel despite the growing hype.<p>[1]: <a href="https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;rust&#x2F;comments&#x2F;qamgyh&#x2F;is_the_chrono_crate_unmaintained&#x2F;hh6rh6y&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;rust&#x2F;comments&#x2F;qamgyh&#x2F;is_the_chrono_...</a><p>[2]: <a href="https:&#x2F;&#x2F;github.com&#x2F;chronotope&#x2F;chrono&#x2F;issues&#x2F;602">https:&#x2F;&#x2F;github.com&#x2F;chronotope&#x2F;chrono&#x2F;issues&#x2F;602</a><p>[3]: <a href="https:&#x2F;&#x2F;time-rs.github.io&#x2F;book&#x2F;api&#x2F;format-description.html#version-2" rel="nofollow noreferrer">https:&#x2F;&#x2F;time-rs.github.io&#x2F;book&#x2F;api&#x2F;format-description.html#v...</a><p>[4]: <a href="https:&#x2F;&#x2F;github.com&#x2F;Keats&#x2F;validator&#x2F;issues&#x2F;201">https:&#x2F;&#x2F;github.com&#x2F;Keats&#x2F;validator&#x2F;issues&#x2F;201</a>
评论 #37238494 未加载
评论 #37240621 未加载
评论 #37238630 未加载
freedomben超过 1 年前
A bit of a side question. I&#x27;m a longtime developer considering diving into rust a bit.<p>I really like the style shown in the examples in TFA. Is the style shown in the examples pretty typical in the ecosystem? Is there tooling that will achieve those results?
评论 #37237783 未加载
wvh超过 1 年前
These objective ecosystem overview articles are pretty interesting to get a good idea of what options are available and what their respective state and rate of adoption is. Especially as a senior developer or consultant, it pays dividends to keep up to date and be able to give the right advice when new projects are started. Choosing the wrong language, ecosystem or paradigm is in my experience the main cause of project failure, being way over time or just general frustration all around.<p>If it&#x27;s your job to make those technology decisions, you better stay informed lest you paint the whole project into a corner, if not immediately, then a few years down the line.
评论 #37238359 未加载
jstx1超过 1 年前
Which one is getting actual adoption? What framework are AWS using for their Rust services? Any other big companies?
评论 #37238682 未加载
spiffytech超过 1 年前
Genuine question: why do people consider Axum&#x27;s developer experience &quot;great&quot;? I&#x27;ve seen people say that several times, but the reason never seems clear to me. Is it something that only starts to pay off in more complicated projects? Or is there some angle I&#x27;m missing?<p>Compared to other frameworks I&#x27;ve used (Rocket, or frameworks in other languages), I&#x27;ve found Axum to be challenging to get up-and-running with.<p>It&#x27;s hard to figure things out from the docs. Basic features require 3rd-party packages. I have to guess my way out of compile errors because the error message &amp; their types are unintelligible. And Axum transparently passing on the underlying Tower (and Tokio?) concepts piles on how much knowledge is required to use the framework.
评论 #37240189 未加载
nelsonic超过 1 年前
&quot;I recommend you to go with Actix or Axum&quot; ... for what use case? Choice is good. But too many options creates decision fatigue. Really wish the creators&#x2F;maintainers of Rust would adopt <i>one</i> Web framework and standardise on it so the Rust-curious could have an easier entry point.<p>That&#x27;s what I <i>really</i> like about the Elixir ecosystem; Phoenix is the automatic no-brainer choice. Just crack on with building your idea.
评论 #37237309 未加载
评论 #37237561 未加载
评论 #37238023 未加载
评论 #37237693 未加载
评论 #37237337 未加载
synergy20超过 1 年前
A critical question first: why do I ever need Rust for web development?<p>Typically a critical question at HN will get downvotes because it is not encouraging or constructive or whatever, but that&#x27;s OK as I really want to know the answer here. I understand Rust is cool for system programming, but I don&#x27;t feel Rust is good for _everything_<p>Assuming you have some cash to make web related products, are you going to use Rust web framework at all? I know I won&#x27;t.
评论 #37238007 未加载
评论 #37237545 未加载
评论 #37237328 未加载
评论 #37237346 未加载
评论 #37237487 未加载
评论 #37237497 未加载
评论 #37237252 未加载
评论 #37237549 未加载
评论 #37254069 未加载
评论 #37237795 未加载
评论 #37237363 未加载
评论 #37237302 未加载
评论 #37237295 未加载
评论 #37237378 未加载
评论 #37237442 未加载
评论 #37238578 未加载
评论 #37237170 未加载
szundi超过 1 年前
You don’t have to learn Node stuff&#x2F;Java&#x2F;Spring&#x2F;PHP&#x2F;ASP.NETC# stuff if you already know some Rust.<p>Or you’re working at one of the biggest project and need all the performance. Not sure it has ROI vs Java even then. Anyone with experience from Rust vs something else firsthand?
评论 #37237605 未加载
ARandomerDude超过 1 年前
Upvoted because Rust. I don&#x27;t use Rust but one day I might outsmart the borrow checker.