What’s new in the Rust programming language


The unique approach of the Rust programming language results in better code with fewer compromises than C, C++, Go, and the other languages you probably use. It also gets updated regularly, often every month.

Where to download the latest Rust version

If you already have a previous version of Rust installed via rustup, you can access the latest version via the following command:

$ rustup update stable

The new features in Rust 1.52

Introduced May 6, Rust 1.52 was led by an enhancement to tooling support for Clippy, which is a collection of lints to find mistakes and improve Rust code. Previously, running cargo check followed by cargo clippy would not actually run Clippy, with the build caching in Cargo not differentiating between the two. This has been fixed in Rust 1.52. Also in version 1.52, the following methods were stabilized:

Several previously stable APIs, including char::len_utf8 and u8LLeq_ignore_ascii_case, are now const. For the compiler, the default LLVM has been upgraded to LLVM 12. A subsequent point release of the language, Rust 1.52.1, published May 10, provides a workaround for a bug in incremental compilation that was made into a compiler error in Rust 1.52.0. Rust builders recommend either an upgrade to 1.52.1 or disabling incremental compilation.

The new features in Rust 1.51.0

Published March 25, 2021, the Rust 1.51.0 release is one of the largest additions to the language and Cargo package manager in quite some time, with the stabilization of an MVP (minimum viable product) implementation of const generics and a new feature resolver for Cargo among the highlights. Other highlights:

  • With the const generics MVP, a tool is added for library designers in developing compile-time safe APIs. A highly anticipated feature, const generics are generic arguments that range over constant values, rather than types or lifetimes. This allows types to be parameterized by integers, for example. The plan is to introduce const generics gradually, so the only types that can be used as the type of a const generic argument currently are the types of integers, including size, usize, char, and bool.
  • Along with const generics, a new API has been stabilized that uses it, std::array::IntoIter, which allows developers to create a by value iterator over any array.
  • For Cargo, the new feature resolver introduces an algorithm for computing package features to help avoid some unwanted unification with the current resolver.
  • Improved compile times on MacOS, with improvements to speed up builds that include debug info and reduce the amount of disk space used.
  • Items such as functions, traits, and structs can be parameterized by constant values in addition to types and lifetimes.
  • Stabilized APIs, including stabilization of 18 new methods for types such as slice and Peekable.

The new features in Rust 1.50.0

Published February 11, 2021, Rust 1.50.0 improves array indexing, expands safe access to union fields, and adds to the standard library. Specific improvements include:



Source link