I used Rust in production for 6 months! Here's my feedback
Are you in two minds when it comes to learning new programming languages? Probably you may feel the same when you first heard about Rust programming language. Good things require some effort and here's what I have to say after using Rust programming language in production for a 6-month duration – It is great and Simply superb! Let's get the clear practical experience picture with Rust at Qovery.
What is Qovery?
Qovery is a Cloud deployment platform used by more than 1000 developers to deploy their apps on AWS. The part in charge of app deployment is written in Rust (take a look, it’s open-source). My team and I do enjoy technical challenges, and when we decided to move out of Python (for robustness reasons), I suggested Rust!
Qovery is installed on the Cloud account of our customers! Meaning, we need to be 100% sure that when Qovery is installed, it will run forever with a minimum memory and CPU footprint. This is a critical piece of our product. It’s a bit like launching a satellite into space. Once it’s launched, it’s nearly impossible to physically repair it.
This is where Rust shines. Once it’s compiled, it works like a charm.
Why not using Go?
To be honest, what we’re doing with Rust could be done with Go. However, from my experience I saw a lot of devs abusing Goroutines (lightweight threads). Leading in concurrency issues. Rust prevents misuse of threads. Which can be frustrating - but for good reasons.
Don't expect new programmers to be productive in the first month
There is a learning curve associated with each programming language and like other languages, developers new to Rust will take time to learn the concepts, play with code, and be productive. You should not expect them to be productive in the first month itself. I'd recommend spending time to dig into crucial concepts like Borrowing, Ownership and Lifetime to better understand Rust. I'd also recommend reading the official book on Rust programming language which is available at - https://doc.rust-lang.org/book/
Rust changes the way we build applications for the better.
Due to excellent type system, Rust is safe by design and it changes the way one builds applications in a positive manner. "Don't fight the borrow checker", spend time to understand why it throws you error - it's for your good. You're probably doing something "wrong" for years without knowing. Personally, it was my case when developing concurrent features on other programming languages like Java and Go. So, don't fight the borrow checker, and embrace it :)
The tooling is good
Rust has some great tools like 'Cargo' which is a Rust dependency manager. Cargo helps in building code, downloading the libraries that the code depends on, and building those libraries. If you are a Java or Kotlin developer and are familiar with IntelliJ IDEA which is an integrated development environment in Java, you do not have to fear as there is an excellent Rust plugin available.
For me, the intelliJ debugger works fine, but it may get challenging to get details on the variables when they are allocated on the heap. Here the LLDB debugger can help with ease. Which I honestly... don't use.
You may not find the library that you need
The Rust programming language has a lot of high-quality libraries. But the Rust ecosystem is not mature like Go, Python, or Java. In case you are unable to find something suitable, you will have to create it. This is an excellent and creative opportunity to contribute to the Rust ecosystem. The community developers are always looking for exciting things on Rust and your contribution will help the community. That's why we open sourced our deployment engine. Trying to contribute to the Rust ecosystem in our way.
Error handling can be verbose
Even though error handling rust may be verbose, it is good to handle all cases. There are mechanisms like the '?' operator that aims to reduce the volume of error handling code, but at some point, like for me, you will have to handle it. But this is also why Rust is so safe, you have to spend time to handle errors instead of skipping them.
Compilation is so slowwwww
Depending on the size of your project, it will take time to download the libraries and build them and could take between one to ten minutes. At Qovery, we started with 2 minutes and 30 seconds of compilation time and today it is at 8 minutes. However, the Rust team has been making improvements to make the compilation faster through incremental builds.
Note: Pierre (CTO of Qovery) configured a distributed cache with SCCache and we reduced build time per 2.
Rust has a strong community.
Rust programming language is great but it is mainly the people who form the Rust developer community that makes Rust a great ecosystem. The community stands for equality and welcomes all. It is small and growing fast. The Rust tooling ecosystem is very active, enthusiastic, and growing which has all the makings to spearhead Rust into a widely used language. I also try to contribute with Qovery and my free time to create new content to show that Rust is accessible to anyone - even with experience in only high level programming language.
Rust is becoming popular day by day with greater adoption of Rust by organizations in the Cloud computing sphere. Rust language has many advantages and is the perfect language to build highly resilient applications. You must think positively of the little longer learning curve and be patient in the first few weeks as developers gain productivity. These little investments will go a long way to improve ways to design apps. There are exciting career options with Rust and we at Qovery believe in a bright future for Rust in the coming years.
If you are excited about Rust (as we are) - drop us a line :) Stay safe.