BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Rust at Six: New Language Edition and Growing Adoption

Rust at Six: New Language Edition and Growing Adoption

This item in japanese

Lire ce contenu en français

Rust has been growing at a steady pace in regard to both its capabilities and industry adoption across the last years. Now at six, Rust is close to a new edition that will introduce new syntax without hampering the Rust ecosystem stability.

Rust editions are mechanisms that help the language grow while keeping its promise of stability. Editions are introduced every two-three years. They collect features previously available in a package and properly supported at the documentation and tooling level but that might not be source-compatible with other editions.

When a new edition becomes available in the compiler, crates must explicitly opt in to it to take full advantage. This opt in enables editions to contain incompatible changes, like adding a new keyword that might conflict with identifiers in code, or turning warnings into errors.

What is important to understand about editions is that most features will be available on all editions except for those that bring some incompatibilities at the syntax level, such as with the introduction of async and await. The Rust compiler is able to use and link together crates using different editions of the language.

The list of changes that will be added to Rust 2021 Edition include a few new methods for the standard library prelude, such as std::convert::TryInto, std::convert::TryFrom, std::iter::FromIterator; a IntoIterator that will support iterations over array values, in addition to array references; a new closure behaviour that will only capture the fields of a struct that they use and not the whole structure; improved panic, which will always require and interpret its first argument as a format string for consistency with println; a new keyword-reserving syntax; and more.

Besides evolving as a language and related tools, Rust has got growing adoption in production environments, says the Rust team. The main highlights include both Microsoft and Amazon providing support for Rust on their Clouds, as well as cURL offering opt-in support for using Rust libraries to HTTP/s and TLS communication.

At the same time, Rust adoption is being considered in several challenging environments. For example, Rust is being considered as a language for safe development of Linux drivers and the Android project has already started working to make it possible to create low-level components of the OS in Rust with the aim of improving its security.

Other interesting projects for Rust evolution and growth include rust-gpu, a compiler backend to write graphics shaders in Rust, and Ferrocene, which aims to make Rust a first-class language for mission and safety-critical systems.

Rust 2021 Edition will be ready by September, says the Rust team, aiming to be included in Rust 1.56.0, scheduled for release on October 21st.

Rate this Article

Adoption
Style

BT