Meet the Rustaceans: Neil Mitchell
This article was written in collaboration with Neil Mitchell, a software engineer at Facebook.
For today’s interview, we’ve got Neil Mitchell, Software Engineer on the Build Infrastructure team at Facebook. The Build Infrastructure team works on build systems like Buck. While working on this team, Neil has used Rust as one of the main development languages. Let’s hear from him about his experience with Rust and learn more about his work.
Tell us about yourself
I’m Neil, a Haskell programmer at heart who has worked with Rust a lot lately. I did my PhD at Haskell, making Haskell programs shorter, faster, and safer. I came to Facebook 18 months ago to work on developer tools, which meant a transition to more Rust.
Why did you / your Facebook team prefer Rust to other languages?
I firmly believe that the compiler will verify your work for you – with enough programmers and enough code, no one can remember all of the subtle properties that make your code safe. However, by enforcing certain rules, the compiler can do this. The Rust compiler ensures that mutability is tamed, parallelism is safe, and no memory leaks. This security gives us the opportunity to aggressively remodel while learning. Combined with advanced abstraction that makes for a powerful language.
What projects have you been working on on Facebook that use Rust?
I worked on two Rust projects on Facebook that were open source:
Gazebo is a library with small utility functions for Rust. None of this is earth-shattering, but all of these little helpers that have been refined, documented and tested can prove to be a real boost. For example, there are functions for splitting strings, for commenting on cheap clone versions, the Any feature with lifetimes.
Starlark is an implementation of the Starlark configuration language in Rust. This project provides a parser, implementation, linter, IDE tools and debugger for the Starlark language. The Starlark language is a deterministic version of Python that is widely used for configuration. For more information on how Starlark works, please visit this blog on our Facebook page for developers.
What do you think of Rust’s growth path on Facebook?
I think Rust has all the qualities to become a major language on Facebook. It’s a more secure C ++. It’s a faster python. It offers compelling advantages over most alternatives in this area.
What is the value of Facebook for Rust?
Facebook has a large number of programmers, and the more people you have programming a language, the more random benefits you will get. In addition, Facebook often publishes open source libraries, including those in Rust, such as Gazebo and Starlark, as mentioned above.
How do you think Rust will grow as a language in 2021?
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?
Rust has a lot of features that I like, but my favorite feature in Rust is constructors. In a language like Java, a constructor has a lot of special rules, has to call supertype constructors, has to return an instance of the class – that’s restrictive and annoying. There’s nothing special about a constructor in Rust – but by convention it’s a static method, usually called new, and usually returns Self (the type of the structure). But since it’s a convention it feels like a constructor, but all the rules can be tweaked, and it’s a lot easier because it’s nothing special. It’s not a big deal, but it’s my favorite feature because it embodies Rust – a series of well-thought-out simplifications that together make a big impact.
Where can people learn more about Rust and how can they start contributing to it?
There are many resources available for learning Rust. I particularly enjoyed learning from Rust with completely too many linked lists. I really don’t recommend books because Rust is somewhat resistant to learning by reading – you have to write code. Spend some time setting up the editor and IDE of your choice, as a lot of getting started with Rust is learning to talk to the compiler and borrow checker. To make a difference, start writing code and follow where your heart takes you.
We’d like to thank Neil for taking the time to do this interview. It was very interesting to see how Rust is used as the primary language for build systems and how we learn from all of 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. Keep an eye out for more interview blogs where we meet many more engineers and hear their thoughts on the subject.
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 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 infrastructure department on Facebook? View our job postings on our infrastructure career page here.