Meet the Rustaceans: Digant Kasundra
This article was written in collaboration with Digant, a production engineer on Facebook.
For today’s interview we have Digant Kasundra, production engineer in the Production Engineering Security team at Facebook. In particular, the Digant team is working on a secure access infrastructure. While working on this team, Digant used Rust as one of the main development languages. Most of his work these days focuses on safer command execution through automation services. Let’s hear from him about his experience with Rust and learn more about his work.
In what capacity did you use Rust?
I’m building a new, widely used binary file for safer command execution by automation services. I’m also considering migrating some of our other services from Python to Rust.
Why did your team on Facebook choose to use Rust over other languages?
Our team is mostly based on Python, and while Python is great for a lot of things, it also brings a lot of resource costs to the system. Since we are working on a widely used binary file, we wanted to make sure we keep the footprint as small as possible. We also saw the benefit of Rust’s strict compiler as an essential tool in avoiding many of the common mistakes one can make in other compiled languages such as C ++. When a language like Rust comes along that can give you a higher level of security at runtime by helping you capture almost anything at compile time, you can’t help but be amazed. As production engineers, reliability is just as important as performance and minimal use of resources. Rust can give you all of these things.
What projects have you been working on on Facebook that use Rust?
I’m brand new to the Rust ecosystem on Facebook. I’ve helped here and there by bringing in some third-party libraries, and I have an ambition to do more. There is a lot of room for impact!
What do you think of Rust’s growth path on Facebook?
I am pleased that Rust is receiving a lot of acceptance. I know that everyone has their own “favorite languages” and fan clubs abound. For me this is not about anything. Objectively, Rust offers great added value and from a technical point of view it makes a lot of sense for Facebook to shift more of our services and infrastructure in this direction.
What is the value of Facebook for Rust?
Rust is growing and expanding into new areas, and the engineers at Facebook have extensive experience in many of these niches. I think we’ll see a lot of posts from Facebook engineers on existing open source Rust projects, and that’s good for everyone.
How do you think Rust will grow as a language in 2021?
I think there are a lot of workstreams on Rust, but what I’m most excited about is the FFI (Foreign Function Interface) and Async improvements. We have so much exceptional C ++ on Facebook, and any ergonomic improvements around FFI would help us leverage existing code. While I think async is pretty good already, it could always use more love. I also heard that the compiler workstream is making great strides which is great!
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?
What I’m going to say is probably controversial and I’ll probably get a lot for it, but to me Rust is like a newbie to programming languages. It absolutely borrows from a lot of existing features and ideas that have been around for a while, but in my opinion the “clean start” option leaves room for rethinking how things should work, and that’s exactly what Rust did. My favorite function is probably the borrow checker (and sometimes my biggest nemesis). Some would argue that this is not a new idea, but that really is not the point. How Rust implements this critical part of thinking about storage and ownership is a big step. Many other languages either let the developer ignore them completely (and have a garbage collection that cleans up after them) or they put everything on the developer to manage every aspect of it. It’s different with Rust. It can handle the child parts of creating and freeing storage, but you need to be clear and direct about how you want to use it at each step. In fact, this is important when you want to avoid difficult to impossible debugging issues in any type of thread application. To me, the credit checker approach is refreshing.
Where can people learn more about Rust and how can they start contributing to it?
I’m sure everyone has heard of the Rust Book by now, but I always tell people to do the Rustlings immediately afterwards. I learn best by doing something practical, so Rustlings was great. After that, I wrote my own client / server application which was a simulator for robots with different skills that search for resources in a maze and fight each other. It was a great little side project. I recommend everyone to come up with a fun side project to help them learn Rust.
We’d like to thank Digant for taking the time to do this interview. It was very interesting to see how Rust is used as the primary language for a secure access infrastructure and how we learn from everything 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. Follow Digant on Twitter at @dckasundra.
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 Rustaceen: Eric Kuecks
Meet the Rustaceans: Gus Wynn
Meet the Rustaceans: Brendon Daugherty
Meet the Rustaceen: Hasnain Lakhani
About the Meet the Rustaceans series
Rust has been consistently rated the “Most Popular” language for the past 5 years and we at Facebook believe Rust is a standout language that shines on critical issues like storage security, performance and reliability and is widely used across a wide range of 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. Keep an eye out for more interview blogs where we meet many more engineers and hear their thoughts 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.