Meet the Rustaceans: Eric Kuecks

This article was written in collaboration with Eric Kuecks, a production engineer at Facebook.

For today’s interview we have Eric Kuecks, production engineer in the Core Data Staging team at Facebook. The Core Data Staging team is working on integration tests for the cache and the database stack on Facebook. While working on this team, Eric used Rust as one of the main development languages. Most of his work these days focuses on preventing site outages by enabling more comprehensive testing of our systems. Let’s hear from him about his experience with Rust and learn more about his work.

In what capacity did you use Rust?

While working on my current team, I’ve moved on to using Rust on a mostly Python code base for some of our command line interfaces and servers, and now I’m starting a new team on which we hope to use Rust extensively. In my previous team, I also wrote some Python extensions in Rust to integrate them into an existing Python code base, as well as written new services in Rust.

Why did your team on Facebook choose to use Rust over other languages?

We came from Python and not having a compiler was a huge pain. We had a lot of runtime errors that otherwise could easily have been caught by any compiled language. We also had performance issues as Python was quite slow, especially since multithreading doesn’t help the CPU-bound work due to the limitations imposed by the GIL (Global Interpreter Lock). We wanted a compiled language that could interoperate with Python as it is much easier to gradually replace our stack than starting from scratch, which left us with either C ++ or Rust.

I think it’s a lot easier to get from nothing to correct code in Rust than it is in C ++. I would argue that this is true even if you “know” C ++ because it has so many cannons of undefined behavior. Rust, on the other hand, has no undefined behavior (outside of unsafe code). That made Rust a clear winner from a practical point of view. Rust language features like traits and enums were a nice bonus as they are way better than what C ++ can offer. From then on, I decided to use it for other projects outside of Python extensions as well, as it’s just really good language.

What projects have you been working on on Facebook that use Rust?

I worked on the server to manage the deployment of TAO (The Associations and Objects), a social graph cache on Facebook. TAO is the main way the front-end code uses to access the social graph data. This included the integration of conveyor belts, several libraries with Python bindings for tools, a library with CXX bindings for C ++, and some small CLI tools.

What do you think of Rust’s growth path on Facebook?

I am super happy with the support the language is getting from some very dedicated people. I’ve seen it grow a lot with production engineers and I would love to see more software engineers use it, especially those who are currently using C ++.

What is the value of Facebook for Rust?

We have some amazing Rust developers here on Facebook working on amazing open source projects. Some examples are CXX, SYN, and Quote which are very useful and dramatically improve the experience for developers using Rust. We also recently released rust-shed, which contains rust boxes that are common in Facebook’s open source projects. We also look forward to having many opportunities to contribute to the rustc compiler.

How do you think Rust will grow as a language in 2021?

Lots of big companies are hiring for Rust, which I think will get many others to follow them. I think Rust is starting to move from a niche enthusiast language to a serious language that should be considered for almost any project.

Some people who have used Rust really like it. Why do you think that is the case and what is your favorite feature of Rust?

There’s a lot to love about Rust, but I think people will like different aspects of it depending on what language they’re from. I have a background in writing Facebook Python that is “compiled” with Buck, but doesn’t have the full benefits of a real compiler. Rust’s amazing compiler certainly stands out as an extraordinary feature for me. It’s amazing how many times my code is completely correct after it’s compiled. In second place are lists of the Rust type (tagged unions), which I always miss when I use another language.

Where can people learn more about Rust and how can they start contributing to it?

The Book-Rust programming language is a great resource to start learning Rust. To help, check out the Rust Zulip server and you can also browse the issues in the Rust Github repository.

We’d like to thank Eric for taking the time to do this interview. It was very interesting to see how Rust is used as the primary language for integration testing and how we learn from all the things we build here and contribute to the Rust community. We hope you found this interview helpful and it gave you some insight into how and where Rust is used on Facebook. Look out for more interview blogs where we meet with other engineers and hear their thoughts on the subject.

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

About the Meet the Rustaceans series

Rust has been ranked the “Most Popular” language consistently for the past 5 years and we at Facebook believe Rust is a standout language that shines and is widely used on critical issues like storage security, performance and reliability by projects here. We have joined the Rust Foundation to help improve and grow Rust, which not only strengthens our commitment to the Rust language, but also to the sustainable development of open source technologies and developer communities around the world.

This blog is part of our Meet the Rustaceans series where we invite engineers and developers who use Rust regularly to share their experiences and tell us about the amazing products they are building with Rust here on Facebook. Look out for more interview blogs where we meet with many more engineers and hear their views on the subject.

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 the field of production technology on Facebook? Here you will find our job advertisements on our career page Production Technology.

Comments are closed.