The Rust programming language just got a big boost from Meta


Image: Deagreez/GETTY

Facebook parent company Meta now encourages its engineers to use the C++ and Rust programming languages ​​to code high-performance backend services.

Rust, originally developed within Mozilla, joins Meta as an officially endorsed server-side language. Adding Rust as a supported language was a “very careful and deliberate decision” to help engineers choose the best language for their projects, according to Meta.

“Meta is committed to providing long-term support for the programming languages ​​used by our developer, and this decision signals Meta’s long-term commitment and support for the Rust language ecosystem,” it said. he declares.

Its supported language status is the next step in Facebook’s adoption of Rust. He joined the Rust Foundation in April 2021 as platinum member with AWS, Google, Huawei, Microsoft and Mozilla.

SEE: What is coding and what is it used for? A beginner’s guide

Facebook has been using Rust since 2016, a year after the release of version 1.0 of the language. Rust is the primary language used for the Diem (formerly Libra) blockchain, its Mononoke source control server, and MoveMeta’s “new secure programming language to use for blockchain”.

Choosing Rust over C++ was a big decision for Facebook since most of its back-end code was written in C++, making it the obvious choice.

Rust adoption gained momentum after Mononoke was deemed a success, attracting engineers with Python and JavaScript backgrounds, according to Facebook.

Today, Rust is the main server-side language supported along with Hack, C++, and Python.

Rust is now recommended for writing command-line interface (CLI) tools and “performance-sensitive back-end services”.

“There is a rapidly growing Rust footprint in our products and services, and we are committed to Rust for the long term and welcoming early adopters,” says Eric Garcia, Meta Software Engineering Manager.

Hack is preferred for business logic and “relatively stateless” applications, while Python remains “the language of choice” for data science, ML applications, and Instagram.

Meta also supports Java, Erlang, Haskell, and Go for specific use cases.

Meta says it carefully considers whether to support a new language because of the risks it entails for efficiency, productivity, and development time. He prefers to keep the list narrow to reduce the number of core libraries, reduce complexity when building security and privacy features, avoid language fragmentation to reduce operational risk, and developer tool support.

Rust’s advantage over Facebook is that it easily interacts with its C++ code to communicate with the back-end systems the services are built on.

“We need developers to be able to use these libraries safely and easily without sacrificing the benefits Rust provides. Conversely, if we want to see Rust components integrated into our larger C++ binaries, we need advanced interoperability “Intelligent execution in asynchronous code. Facebook’s servers are highly distributed and heavily threaded. Rust tasks must run smoothly on a C++ thread pool and safely share synchronization primitives and I/O resources,” Meta-engineers recently explained.

AWS has favored Rust in its organization for building infrastructure software and encourages it for its reduced impact on energy consumption compared to Python and even Java. Rust-based AWS services include Firecracker, the technology behind its Lamba platform for containerized applications, Amazon Simple Storage Service (S3), Elastic Compute Cloud (EC2), its CloudFront content delivery network, and Bottlerocket, a cloud computing system. Linux-based container operation.

SEE: Cloud Computing Security: Where It Is, Where It’s Going

Google allows contributors to the Android Open Source Project to write new Android code in Rust, but the Chrome team has chosen to stick with C++ rather than Rust as their primary language for the foreseeable future. Microsoft has been experimenting with Rust for Windows as an alternative to C and C++ since 2019, while the Azure team has embraced it for cloud coding.

Rust isn’t as widely used as Python and Java, but it’s consistently rated “the most loved programming language” in Stack Overflow’s annual developer surveys. Even ransomware gangs rewrite their malware in Rust.

Comments are closed.