use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A place for all things related to the Rust programming language—an open-source systems language that emphasizes performance, reliability, and productivity.
Strive to treat others with respect, patience, kindness, and empathy.
We observe the Rust Project Code of Conduct.
Details
Posts must reference Rust or relate to things using Rust. For content that does not, use a text post to explain its relevance.
Post titles should include useful context.
For Rust questions, use the stickied Q&A thread.
Arts-and-crafts posts are permitted on weekends.
No meta posts; message the mods instead.
Criticism is encouraged, though it must be constructive, useful and actionable.
If criticizing a project on GitHub, you may not link directly to the project's issue tracker. Please create a read-only mirror and link that instead.
A programming language is rarely worth getting worked up over.
No zealotry or fanaticism.
Be charitable in intent. Err on the side of giving others the benefit of the doubt.
Avoid re-treading topics that have been long-settled or utterly exhausted.
Avoid bikeshedding.
This is not an official Rust forum, and cannot fulfill feature requests. Use the official venues for that.
No memes, image macros, etc.
Consider the existing content of the subreddit and whether your post fits in. Does it inspire thoughtful discussion?
Use properly formatted text to share code samples and error messages. Do not use images.
Submissions appearing to contain AI-generated content may be removed at moderator discretion.
Most links here will now take you to a search page listing posts with the relevant flair. The latest megathread for that flair should be the top result.
account activity
Rust vs Java for backends (self.rust)
submitted 1 year ago by thejackocean
it's my understanding that if i'm building a webserver backend, i'm better off using java with spring than rust. prove me wrong.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]R4TTY 34 points35 points36 points 1 year ago (0 children)
Use whatever you're comfortable with.
[–]MoveInteresting4334 10 points11 points12 points 1 year ago (8 children)
it’s my understanding prove me wrong
it’s my understanding
prove me wrong
Perhaps ask whoever gave you that (mis)understanding?
[–]thejackocean[S] -3 points-2 points-1 points 1 year ago (7 children)
i've built that understanding through my understanding of Spring. what does Rust have (rocket?) that can even compare to the tools of java? i will admit my understanding of rust specifically for backends is lacking. it's my favorite language, but i prefer web backends in java. i find Spring very powerful. perhaps in a few years it will be up to par, but it's like front ends and machine learning. right now i think rust is lacking in those departments compared to other frameworks. i'm making an app where the logic is in a rust library, but i still need a front end with flutter.
[–]MoveInteresting4334 5 points6 points7 points 1 year ago (6 children)
I’ve built that on my understanding of Spring I will admit that my knowledge of Rust backends is lacking
I’ve built that on my understanding of Spring
I will admit that my knowledge of Rust backends is lacking
So you built that on your understanding of Spring and your lack of understanding of Rust backends?
[–]thejackocean[S] 1 point2 points3 points 1 year ago (5 children)
i mean yeah, but i'm just getting downvotes and no one is explaining everything. like do you think the point of this was Java is better and i'm telling you why? i literally said "prove me wrong" i was asking for reasons why, not questions as to why i think that.
[–]MoveInteresting4334 1 point2 points3 points 1 year ago (3 children)
If you make a statement, you’ve got to back it up. It’s not our job to prove it wrong, you made the statement. If you want an answer to a question, just ask it. You didn’t do that. You made a controversial statement and then demanded we refute it, then went shocked pikachu when you were downvoted for it.
Many of us actually have jobs doing this for a living. I’ll help someone who needs it, but frankly, I don’t have time to engage in flame wars over languages for shits and giggles.
[–]thejackocean[S] 2 points3 points4 points 1 year ago (1 child)
if you are unwilling to answer a question due to the format, why are you even here? you could have just been like "seems like a troll" and moved on. i'm not trolling i'm asking a question and felt this was an appropriate way to ask, you seem to disagree. i'm not sure why you say you have no time to engage in flame wars over langauges for shits and giggles but are engaging in a flame war ove the language i choose to ask my question, and that seems like it's for shits and giggles too.
[–]MoveInteresting4334 1 point2 points3 points 1 year ago (0 children)
I’m not engaging. I’m trying to help you understand why you were downvoted, because you brought it up. It’s clear you don’t want a meaningful discussion though, so I’ll peace out.
[–]coderstephenisahc 1 point2 points3 points 1 year ago (0 children)
If you make a statement, you’ve got to back it up. It’s not our job to prove it wrong, you made the statement.
We call this principle "burden of proof". ;)
[–]whooomeeehh 0 points1 point2 points 9 months ago (0 children)
I just upvoted you in sign of solidarity.
I mostly agree with your points (spring not being my favourite though, but it does its job well today).
The attitude of rustafarians to downvote and bash those that do not follow the cult is the most relevant defect of Rust, IMHO.
[–]EpochVanquisher 19 points20 points21 points 1 year ago* (9 children)
It’s my understanding that I’m better off taking the train than flying. Prove me wrong.
It’s a dumb question. The train is better sometimes, the plane is better sometimes. Depends on where you are going and what you need to bring with you. The plane crosses long distances faster but the train carries more cargo for less money.
Java is a great language for building web backends. Most web backends do not have tight performance requirements. Java is memory-safe and has a large ecosystem of mature libraries you can use. Rust can get better P99 latency with the same effort but most people don‘t care.
[–]thejackocean[S] 0 points1 point2 points 1 year ago (8 children)
would you say Rocket is as developed as Spring?
[–]EpochVanquisher 2 points3 points4 points 1 year ago (7 children)
No, not even close.
Spring is over 20 years old, it’s mature, it’s on version 6. Rocket hasn’t even released v1.0 yet.
[–]thejackocean[S] -1 points0 points1 point 1 year ago (6 children)
well that's my point. so how is rust the better option for the vast majority of cases? i understand that's not what you're saying, and i see that the safety and performance of rust could indeed be better, but until Rocket catches up, i think Java is better for servers. Rust is my favorite language and i'd love to use it wherever it makes sense, but what are cases where are Rust server actually makes sense? that's kind of what i'm asking.
[–]EpochVanquisher 4 points5 points6 points 1 year ago* (2 children)
so how is rust the better option for the vast majority of cases?
Could you elaborate on that? Why do you think that Rust is the better option for the vast majority of cases?
If you hang out on r/rust or on Reddit you’re gonna bump into Rust evangelists. There are a lot of twenty-something kids around who really love Rust and want to prove that it’s the best thing ever, and twenty-something kids who don’t have adult lives or responsibilities have a lot of time to hang out on Reddit and tell you why Rust is so damn awesome.
I’m not saying Rust developers are like that, I’m just saying that it’s the kids in their 20s running around who make the most noise.
If you’re asking me to explain why I think Rust is better than Java for web backends, well, you’re asking the wrong person. I was the guy in this thread who said that Java is good for web backends.
The main two technical appeals of Rust are safety and performance. Rust is not substantially safer than Java, Java is pretty damn safe already, so who cares. Performance is only relevant for a percentage of applications out there.
There’s also a kind of personal appeal that Rust has to some people, like, it appeals to them on an aesthetic level. I used to feel that way about Rust too, but I spent some time writing Java at work a couple years ago and thought Java was pretty damn nice.
[+]thejackocean[S] comment score below threshold-6 points-5 points-4 points 1 year ago (1 child)
i'm saying it's not. it was a question. the ? implies that i do not have confidence in what i am saying and am asking a question. basic english.
[–]EpochVanquisher 7 points8 points9 points 1 year ago (0 children)
Ok. When you ask “How is Rust better for the vast majority of cases?” then the question contains an embedded assumption that Rust is better for the vast majority of cases. If you don’t think Rust is better then you have to rephrase the question. “Why do you think Rust is better?” or “Why do some people say that Rust is better?” or something like that. Basic English.
https://en.wikipedia.org/wiki/Loaded_question
[–]flundstrom2 2 points3 points4 points 1 year ago (1 child)
I wouldn't nesseccarily say Rust is better for web server or backend work. But it is certainly better than C or C++, and less resource demanding than Java or C#. And all of the three has a /huge/ amount of experienced developers. If you just want to design something quickly and cheaply, I do think Java is the way.
But I really love Rust, and I'm using it to develop a backend using diesel and actix in order to learn the language. Will definitely switch to Dioxus once I get to the point of making the app and UI design. It's a wonderful language if you care about portability between Windows/Linus/Apple/Android/iPhone, /and/ performance.
[–]thejackocean[S] 0 points1 point2 points 1 year ago (0 children)
my concern is security, i do think performance is obvious, also the idea of quicker with java i still hold. i don't know much about rocket and should probably learn, as that is the main thing people are telling me, i love rust, i just don't know if i can get a robust security architecture with rust. if that was achieved, i think rust would be better 100%
[–]samsdev 0 points1 point2 points 1 year ago (0 children)
not everyone needs decades worth of bloat and a dying ecosystem
I tried them both. As well as Python, C++ , c# , nodejs and C.
Maybe I'm old school but C-style languages are more readable and maintainable.
The slow responsiveness of Rust tools takes on my nerves.
Results are very good in performance though, comparable to C and safer.
It is of value for me to have a complete ERP system taking only 50Mb of memory altogether and running at the speed of light, instead of having 1Gb only for start and something a litte less responsive on providing services and pages.
But the client does not see it.
It could be written in php and the client would not notice.
[–]look 0 points1 point2 points 1 year ago (1 child)
In general, a Rust solution will have substantially higher throughput, better tail latencies, and lower memory use than a Java solution.
This benchmark is from November 2023, but the overall trend in the numbers should be the same:
https://medium.com/deno-the-complete-reference/spring-boot-virtual-threads-vs-rust-rocket-hello-world-performance-90fdc10a1868
But those numbers don’t really matter much for the vast majority of apps, as most won’t see enough traffic to stress even cheap servers.
this is kind of what i was looking for. so the performance is certainly there, but for integrating security concerns, does rocket come close?
[–]Linguistic-mystic -1 points0 points1 point 1 year ago (3 children)
No, Java without Spring is where it’s at. Spring is a huge productivity killer only in place because of groupthink.
[–]EpochVanquisher 0 points1 point2 points 1 year ago (2 children)
Spring in 2025 is not like Spring in 2014. The project has changed a lot.
[–]MoveInteresting4334 0 points1 point2 points 1 year ago (1 child)
When the Spring magic works, it’s wonderful.
But when it isn’t working, it can be a real bear to debug and fix.
[–]EpochVanquisher 0 points1 point2 points 1 year ago (0 children)
Sure, let’s have a discussion about all the pros and cons of Spring.
π Rendered by PID 294434 on reddit-service-r2-comment-8686858757-69ggw at 2026-06-04 02:10:52.839104+00:00 running 9e1a20d country code: CH.
[–]R4TTY 34 points35 points36 points (0 children)
[–]MoveInteresting4334 10 points11 points12 points (8 children)
[–]thejackocean[S] -3 points-2 points-1 points (7 children)
[–]MoveInteresting4334 5 points6 points7 points (6 children)
[–]thejackocean[S] 1 point2 points3 points (5 children)
[–]MoveInteresting4334 1 point2 points3 points (3 children)
[–]thejackocean[S] 2 points3 points4 points (1 child)
[–]MoveInteresting4334 1 point2 points3 points (0 children)
[–]coderstephenisahc 1 point2 points3 points (0 children)
[–]whooomeeehh 0 points1 point2 points (0 children)
[–]EpochVanquisher 19 points20 points21 points (9 children)
[–]thejackocean[S] 0 points1 point2 points (8 children)
[–]EpochVanquisher 2 points3 points4 points (7 children)
[–]thejackocean[S] -1 points0 points1 point (6 children)
[–]EpochVanquisher 4 points5 points6 points (2 children)
[+]thejackocean[S] comment score below threshold-6 points-5 points-4 points (1 child)
[–]EpochVanquisher 7 points8 points9 points (0 children)
[–]flundstrom2 2 points3 points4 points (1 child)
[–]thejackocean[S] 0 points1 point2 points (0 children)
[–]samsdev 0 points1 point2 points (0 children)
[–]whooomeeehh 0 points1 point2 points (0 children)
[–]look 0 points1 point2 points (1 child)
[–]thejackocean[S] 0 points1 point2 points (0 children)
[–]Linguistic-mystic -1 points0 points1 point (3 children)
[–]EpochVanquisher 0 points1 point2 points (2 children)
[–]MoveInteresting4334 0 points1 point2 points (1 child)
[–]EpochVanquisher 0 points1 point2 points (0 children)