This article was written in collaboration with Brendon Daugherty, a Production Engineer at Facebook.
For today’s interview, we have Brendon Daugherty who is a Production Engineer on the IaaS (Infrastructure as a Service) Resources team at Facebook. The IaaS team works on building tools and systems to better manage Facebook’s infrastructure at scale. While working on this team, Brendon has been using Rust as one of the main languages for development. He primarily works on distributed systems, services and cron jobs. Let’s hear from him about how his experience with Rust has been and learn more about his work.
Our team primarily writes Rust. Almost all of the code I've written at Facebook has been in Rust, which includes lots of Command Line Tools, some distributed systems and a few cron jobs.
My team has mostly transitioned from Python to Rust, for a few key reasons:
Almost every project I've worked on at Facebook has been in Rust:
I feel pretty good about it. More and more services are being written in Rust, and more tools are adding Rust support. We are lucky to have a budding community of Rust developers here at Facebook and a strong Rust foundation team, who are helpful with code reviews, as well as with learning Rust.
I think Facebook is doing some great work when it comes to interoperability with C++. CXX is amazing, and has made it a lot easier for me to use Rust, as integrating with existing C++ libraries both inside and outside of Facebook is a breeze.
I think Rust is growing the most in its community. With big improvements to lifetimes and the compiler, Rust is becoming more and more accessible. Because of that, many more people are starting to see just how much easier programming can be when you have Rustc as a co-pilot. With this, people are building better tooling, and the environment just keeps getting better.
My favorite feature of Rust is Rustc. Coming into Rust when I started here at Facebook, I'd written a lot of C++. I originally worried that I'd need to learn an entirely new language, but what I didn't realize was that despite 4 years of using C++ in school, I was actually more prepared to write Rust than C++. To write C++ you have to be extremely careful. I wasn't quite prepared to scrutinize my team's code, watching for dangling pointers, and undefined behavior.
Now that I use Rustc though, not only have I written a lot of code that I know is safe, but I also have become a better programmer. Going back and forth with Rustc has taught me to be mindful of how data is moving throughout my program, and when I review or write Python code, I'm much more careful since I don't have Rustc with me at the wheel.
The Book-Rust Programming Language is definitely the place to start. Give it a read through, and then start your own project. There's also a pretty great Rust Programming Language community on Discord that I would recommend joining where you can ask questions and even find a good project to contribute to.
We would like to thank Brendon, for taking the time to do this interview. It was very interesting to learn how Rust is being used as a primary language for building tools and systems and how we are learning from all the things we build here and contributing back to the Rust community. We hope you found this interview useful and it gave you some insight into how and where Rust is being used at Facebook.
Check out our previous blogs from the Meet the Rustaceans series:
Meet the Rustaceans: Chris Konstad
Meet the Rustaceans: Pedro Rittner
Meet the Rustaceans: Neil Mitchell
Meet the Rustaceans: Daniel Xu
Meet the Rustaceans: Eric Kuecks
Meet the Rustaceans: Gus Wynn
Rust has consistently been ranked as the “most loved” language for the last 5 years and we at Facebook believe that Rust is an outstanding language that shines in critical issues such as memory safety, performance and reliability and is being used widely over a large range of projects here. We joined the Rust Foundation to help contribute towards the improvement and growth of Rust, which not only strengthens our commitment towards the Rust language but also towards a sustainable development of open source technologies and developer communities across the world.
This blog is a part of our Meet the Rustaceans series, where we invite the engineers and developers who use Rust on a regular basis to share their experiences and tell us about the amazing products that they are building using Rust here at Facebook. Look out for more interview blogs where we meet with many more engineers and hear their thoughts on this topic.
To learn more about Facebook Open Source, visit our open source site, subscribe to our YouTube channel, or follow us on Twitter and Facebook.
Interested in working in Production Engineering at Facebook? Check out our job postings on our Production Engineering career page here.
TAGS
Sign up for monthly updates from Meta for Developers.