- Supporting a programming language at Meta is a very careful and deliberate decision.
- We’re sharing our internal programming language guidance that helps our engineers and developers choose the best language for their projects.
- Rust is the latest addition to Meta’s list of supported server-side languages.
At Meta, we use many different programming languages for a wide variety of platforms and use cases. Supporting a new language is not a decision we make lightly. It’s important that every language we adopt is the best fit for a particular use case, so we do a high level of diligence whenever we evaluate a language. Language decisions tend to stick once they’re made, so we want to be deliberate from the onset to give our engineers the best tools to work with.
Today, we’re sharing insights into our internal guidance on the various languages that play an important role at Meta — and specifically our server-side programming languages, to which Rust is the latest addition.
What is a supported language at Meta?
Before we get into the individual details, here’s what supported means (and doesn’t mean) within Meta:
- If a language is supported, developers can count on getting a good experience with code editing, debugging, build, and deployment, as well as core libraries and interoperability. Developers can also count on that experience not going away — they won’t be asked to move off a supported language. For most cases, Meta recommends choosing a supported language for new projects and services.
- Fully supporting a language is a major investment for Meta, so “long tail” languages are community supported. For those languages, there are far fewer guarantees, and teams adopting them will have to take on the maintenance burden. In most cases, teams should avoid using them for new applications, unless a team already has a significant investment in the language.
Meta’s primary supported server-side languages are Hack, C++, Rust, and Python.
- For performance-sensitive back-end services, we encourage C++ and Rust. Rust is a new addition to this list. There’s a rapidly increasing Rust footprint in our products and services, and we’re committing to Rust long-term and welcome early adopters.
- For CLI tools, we recommend Rust. This is a new recommendation for this year.
- For business logic and relatively stateless applications, the Hack ecosystem has the highest level of automation and support at Meta and is the recommended language.
- Finally, Meta continues to heavily support our Python developers. For data science, ML applications, and Instagram, Python continues to be the language of choice, and we continue to invest in the experience with this ecosystem.
- For specific use cases, we support other languages, including Java, Erlang, Haskell, and Go. These languages are currently not widely supported outside of specific use cases.
How did we arrive at our list of supported languages?
Let’s explain why we have a supported language list and why we’re generally reluctant to add languages to that list (although Rust is a new addition). The main reason is that it takes a significant engineering investment to support a programming language at Meta scale, and that cost is broadly distributed — not just borne by its users. Some examples:
- Support for core libraries. There are very few isolated services, and the fewer languages we have, the less burden there is on core libraries.
- Security and privacy. A fragmented stack raises the complexity of building important security and privacy features into our services.
- Operational risk. If some service encounters a critical issue, it will require immediate assistance. We’ve built up incredible amounts of expertise in diagnosing and resolving production issues, and our incident response relies on being able to read, understand, and debug services to help in a major incident. Avoiding fragmentation reduces operational risk.
- Expertise. We build and maintain a critical mass of engineers with expertise in each of these languages.
- Developer experience. Supported languages have teams working on improving areas like IDE support, build speed, debugging experience, and more.
Choosing a suboptimal language for a project can be costly in terms of time, efficiency, and productivity. So, it’s worth putting every language we evaluate under a heavy amount of scrutiny. The examples above demonstrate just how much investment we put into supporting a language.
Rust is the latest server-side language at Meta
Since we began our journey with Rust, the number of projects using Rust inside Meta has increased at an accelerated rate. We’re excited to see Rust added to this list of server-side supported languages, giving our engineers more tools, flexibility, and support for their work. Meta is committed to provide long-term support for programming languages used by our developer, and this move signals Meta’s long-term commitment and support for the Rust language ecosystem.