DEV Community

Sergey Kislyakov
Sergey Kislyakov

Posted on

What's Rust good for?

I'm on my way to learn something new in 2018 and currently looking at Rust. I know Mozilla uses it for some parts of Firefox but I haven't seen any other projects outside of the Firefox ecosystem that uses Rust heavily (maybe I didn't look up good enough?)

So, my question is simple - what's Rust good for?

Top comments (9)

Collapse
 
tom profile image
tom

The Rust book has a great summary for you:

Rust is a programming language that’s focused on safety, speed, and concurrency. Its design lets you create programs that have the performance and control of a low-level language, but with the powerful abstractions of a high-level language. These properties make Rust suitable for programmers who have experience in languages like C and are looking for a safer alternative, as well as those from languages like Python who are looking for ways to write code that performs better without sacrificing expressiveness.

It is suitable for people writing:

  • high performance servers
  • command line utilites
  • operating system modules
  • web browsers
  • embedded applications
  • lots more!

Hope that helps!

Collapse
 
carlymho profile image
Carly Ho 🌈

I was wondering this too after seeing a lot of people use it for Advent of Code! I might check it out, too, it sounds neat.

Collapse
 
tom profile image
tom

Great! I'm also a beginner with Rust but it seems to have everything I've wanted in a language (staticly typed, runtime-free, first-class immutabilty). And as a frontender the WebAssembly support makes it extra-interesting.

Collapse
 
defman profile image
Sergey Kislyakov

Thanks for the answer. Looks like I'll enjoy learning Rust πŸ˜€

Collapse
 
tcbyrd profile image
Tommy Byrd

One of the issues with a systems language is it isn't really transparent when a company has chosen to use Rust unless they talk about it openly or open source the tools. Dropbox has probably been the second biggest company talking about their use openly. Their GitHub Org has several public repos that come up as primarily written in Rust.

Additionally, one of the things that people seem to be doing with Rust is re-writing tools they previously wrote in another language. Some of the more popular things are terminal emulators, replacements for *nix command line tools, and various other small utilities. I think the past year or so has been filled with people experimenting with Rust on small things to work out how to be productive with the language. My hope is that 2018 will be the year we see some serious apps built primarily using Rust. Getting the Quantum engine into production was a serious milestone and Diesel just released it's first release candidate for 1.0. A few more big ships like that and I think Rust will be a strong contender for just about any application you'd want to build.

Collapse
 
defman profile image
Sergey Kislyakov

Thanks for your answer. I've seen some nix tools re-written in Rust recently, yes. My hopes goes to WebAssembly because I'm more of a Webdev guy.
Never heard of Diesel before. Thanks for sharing it :) I'll give it a look.

Collapse
 
ropthe_ profile image
Nathaniel Saul • Edited

I’m curious if anyone has had success writing ML and algorithms in Rust and interfacing with Python.

Often, people will write the core parts in C++ and the rest in Python. Is Rust a good alternative for this?

Collapse
 
defman profile image
Sergey Kislyakov

I guess if someone will make a Rust-Python binding package, there will be ML and algorithms written in Rust too.

Collapse
 
mnivoliez profile image
mnivoliez • Edited

You could say that, in a way, Rust can do pretty much everything. It's a system language and thus, can play where he wants to. But good, it's a good question where I can't find a proper answer.
Some point should be consider before answering:

  • tools,
  • simplicity,
  • support As such, depending on the field, not all the box are checked.

The tooling is on his way for a majority of field, or is already here.
About support, it's a lot more specific. For exemple, no big company in the game industry is knowned to use Rust (even though the creator of starbound said he used Rust for his next game Spellbound).
Andthe last one is simplicity. I'll say only this: you manage memory. You use system programming language, it came with a cost #lifetime #borrowchecker. But even for web, some good and robust tools are on the way (Rocket, Web assembly, etc...).

So, the advise I could give you is to carefully see what you want to do. Depending on your answer, Rust may not be the language you are looking for. But, despite Rust not being present in the field you want to explore, you still want to use it, please proceed. It could open new way to use Rust.

Moreover, I think everyone should practice Rust, at least only once, since it's a good way to learn a lot of stuff about programming and CLEAN code.

That said, it's only my opinion.

PS: At some point I may have gone out of the scope of your question, sorry about that.