Meta Adds Rust to Its Portfolio of Internally-Supported Languages

Wednesday, social media giant Meta announced that it is now officially using Rust as a server-side programming language. It is one of four languages that the company’s developers are “officially” using, joining C++, Python and Facebook’s own internal rewrite of PHP, Hack.
“The number of projects using Rust inside Meta has increased at an accelerated rate,” explained Eric Garcia, a software engineering manager at Meta and a member of the board of directors of the Rust Foundation, in his recent blog post explaining the addition.
Meta joins Amazon Web Services, Microsoft, and Dropbox, among many others, as enthusiastic adopters of Rust. Facebook joined the Rust Foundation in 2021 and started using Rust in 2016.
This comes as no surprise since Rust rates highly favorable among the developer community with the proof of that shown in the language being named “Most Loved” in the 2022 Stack Overflow Developer Survey last month.
Garcia’s blog post lists “performance-sensitive back-end services and CLI tools” as the types of projects Rust is being recommended for. Rust and C++ are syntactically similar, and C++ is still encouraged for performance-sensitive back-end services. But Garcia makes it clear that “there’s a rapidly increasing Rust footprint in our products and services, and we’re committing to Rust long-term and welcome early adopters.”
Meta’s own open sourced language, Hack, based on PHP, is still the recommended language when it comes to business logic and relatively stateless applications. In 2013 and 2014 Facebook refactored the majority of the core of its website using Hack. Hack continues to have the highest level of support and automation.
Python still remains the language of choice for data science, machine learning applications, and Instagram. Python won’t be rendered obsolete anytime soon at Meta as this ecosystem is still one that Meta will invest in.
Outliers
Though Rust, C++, Hack, and Python are the only official supported programming languages for server-side use, outliers exist when needed. Java, Erlang, Haskell, and Go are supper for specific use cases but aren’t currently widely supported. There is no indication as to whether or not they will be widely adopted in the future or what they are used on specifically.
Meta puts high consideration into supporting a new programming language as once it’s adopted into the platform and tools, it tends to be there in perpetuity. Careful evaluation takes place to determine if the language under consideration is in fact one of the best tools to work with for a variety of use cases.
Community Supported Languages, aka “long tail” languages, are advised against by the social media company, unless the team itself has a high amount of experience with the language. The evaluation process was not made available.
The expectation of high-quality developer experiences comes along with labeling something a “supported” language at Meta. Characteristics of a high-quality developer experience are a good experience with “code editing, debugging, build, deployment, core libraries, and interoperability” as listed in Garcia’s post. This comes at a significant cost but that is simply required to operate on a scale as large as Meta’s.
The fragmentation of the stack in terms of how many languages are used has great impact on the security, privacy, support for core libraries, and operational risk as well. Garcia states in a roundabout way that the fewer languages the company uses, the easier it is to mitigate the overall risks and minimize challenges.