DEV Community

Max
Max

Posted on • Updated on

What do you use Rust for?

Someone noted to me recently that using Rust for general purpose microservices like interfacing GraphQL to Postgres makes no sense - it is a system-level language. So far I tend to disagree. I stopped using .Net and are cutting my AWS Lambda code in Rust for a new web project.

What do you use Rust for?

Top comments (5)

Collapse
 
vonheikemen profile image
Heiker

I believe they dropped the "system-level language" label a while ago. Even their website says.

A language empowering everyone to build reliable and efficient software.

I've only used rust for fun and learning but I would consider it for anything where safety is a top priority.

Collapse
 
ducaale profile image
Mohamed Dahir • Edited

I see two use cases where rust can be useful (at least, that is what I have tried so far):

  • Cli tools: if you need a statically linked binary file that easy to deploy and has a minimal startup time (Imagine if httpie was ported to rust)
  • Game dev: as a replacement for C++ (no more segfaults or weird cryptic errors from templates)
Collapse
 
gklijs profile image
Gerard Klijs

I tend to agree with that for now. But that's mainly because the libraries fro rust aren't always as mature as for example the ones on the JVM. Also partly because of and partly because of Rust, building the same general purpose microservice is faster with other languages.

And also cross cutting concerns like logging and monitoring. Using them as Lambda it's pretty equal to other languages in that respect. But if you run them 'yourself' this becomes more of a concern.

Collapse
 
dfockler profile image
Dan Fockler

I've mostly use it to practice and learn a statically typed language, with the added benefit of modern tooling and centralized documentation. I particularly like the lack of cruft (relative to C++), and all the nice functional features in Rust like iterators, pattern matching, and closures.

Collapse
 
geoxion profile image
Dion Dokter

Using it for embedded development and the accompanying server. Pretty cool stuff! I never want to go back to C again.