this post was submitted on 22 Oct 2023
37 points (95.1% liked)

Rust Programming

8150 readers
7 users here now

founded 5 years ago
MODERATORS
 

In practical perspectives, I'm mostly concerned about computer resources usage; I have computer resources constraints. So using Rust would benefit on that. But it is for a Web application backend. So, is it worth it having to learn Rust + Tokio + Axum, ... in this specific situation? Also, that this is mostly for initially prototyping an application. Also considering if I add developers in the future, they would most likely not be familiar with Rust, but with more popular frameworks such as Node.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago (1 children)

If it’s a simple CRUD backend + database, then there’s really no reason to use Rust except if you just want to.

I did this. Further reasons are: correctness and performance.

Rust is much faster while at the same time using a fraction of the resources the equivalent Spring Boot implementation would use. The type safety and being freed from runtime errors is awesome as well. Yes initial development takes longer, but I believe it is worth it. Most projects spend maybe 2% on initial development, 98% is bugfixing, troubleshooting, refactoring. I am confident Rust cuts down on bugfixing by 2/3, which means doubling the initial dev time is well worth it. And it doesn't even take twice as long.

[–] [email protected] 2 points 1 year ago (1 children)

For very simple backends, it's very unlikely you'll get any significant number of bugs with an experienced team, and if performance isn't really a concern, then Rust being faster isn't really relevant. For anything more complex than a simple backend, I'd agree that Rust becomes a lot more appealing, but if you just need to throw together something that handles user profiles or something in a very simple manner, it really doesn't make a difference what language you do it in as long as you write a few tests to make sure everything works.

[–] [email protected] 1 points 1 year ago