Rust’s unique approach results in better code with fewer compromises than C, C++, Go, and other languages ​​you’d probably use. It is also updated regularly, often every month.

Where to download the latest version of Rust

If you already have an earlier version of Rust installed via rustupYou can access the latest version with the following command:

$ rustup update stable

New features in Rust 1.56

Rust 1.56 was announced on October 21, and is the first language version to support Rust 2021. The Rust 2021 release allows Rust box authors to opt-in to language changes that make Rust easier and more consistent to use. Chests can subscribe at any time and remain interoperable with chests in older versions. Rust compiler supports all three language versions: 2015, 2018, and 2021.

Other new capabilities in Rust 1.56 include:

  • Pick up disassembled in closure, to simplify writing the closure.
  • Cargo.toml now supports the . file [package] [rust-version] To determine the minimum supported Rust version of the chest, Cargo will exit with an early error if this is not met. While this does not currently affect the dependency analyzer, the intent is to detect compatibility issues before they turn into coded compiler errors.
  • New links are supported in @link style. Rust pattern matching can be written with a single identifier that associates the entire value, followed by @ And a more refined structural pattern, but no additional binding in this pattern has yet been allowed. This functionality was allowed before version 1.0 of Rust, but was removed due to insecurity. The compiler team has now determined that this pattern is safe and permissible in the case of stable rust.
  • Panic macros now expect format strings, just like printlin!().
  • A number of APIs are installed including std::os::unix::fs::chroot And UnsafeCell::raw_get.

New features in Rust 1.55

Announced September 9, 2021, Rust 1.55 announced a faster and healthier float analysis. The standard library implementation of buoyancy analysis has been updated to use the Eisel-Lemire algorithm, which brings improvements in speed and health. Previously, some edge cases failed to parse, but now they are fixed.

Also in Rust 1.55:

  • The use of open ranges is fixed in patterns.
  • A number of methods have been installed and themes implemented including Bound::cloned And Drain::as_str.
  • Shipping Package Manager now deduplicates compiler errors and prints a report at the end of compilation. Previously, when running cargo testAnd cargo check ---all targets, or similar commands that built the same Rustbox in multiple configurations, errors and warnings might appear duplicates as Rust executions were executed in parallel and showed the same warning.

New features in Rust 1.54

Published July 29, Rust 1.54 supports calling function-like macros within attributes. Function-like macros can be macros based on macro-rules! Or they can be procedural macros, called like macro!(…). A notable use case is including documentation from other files in Rust doc comments.

Other new features in Rust 1.54:

  • A number of Instrins tools have been installed for the wasm32 platform. These allow access to SIMD Help in WebAssembly.
  • Incremental translation is re-enabled by default. It is disabled by default in Rust 1.52.1. With Rust 1.52, an additional validation was added when an incremental assembly was loaded from the disk cache, exposing potential pre-existing safety issues as validation changed these silent errors to internal compiler errors (ICE). Since then, these issues have been worked around, with some fixes landing in Rust 1.53 and the majority in Rust 1.54. Residual problems that may lead to ICE are rare in practice.
  • Multiple methods are installed and themes are implemented.
  • Compiler output is optimized for debugging numbers on Windows MSVC platforms for C++.

Rust 1.54 comes after the June 17 release of Rust 1.53, which contains language and library features including IntoIterator Arrays implementation.

New features in Rust 1.52

Rust 1.52 was introduced on May 6, and was led by improving tool support for Clippy, a set of scripts for finding bugs and improving Rust code. Previously, running cargo check followed by cargo clippy It won’t actually run Clippy, with no differentiation between build caching in Cargo. This is fixed in Rust 1.52. Also in version 1.52, the following methods are installed:

Several previously stable APIs, including char::len_utf8 And u8LLeq_ignore_ascii_case, they are now const. For the compiler, the default LLVM has been upgraded to LLVM 12. Language later point version, Rust 1.52.1 Posted on May 10, provides a workaround for an incremental compilation bug that was made in a compiler bug in Rust 1.52.0. Rust builders recommend either upgrading to 1.52.1 or disabling incremental assembly.

New features in Rust 1.51.0

Published on March 25, 2021, Rust 1.51.0 is one of the biggest additions to the Shipping and Language Pack Manager in some time, with the MVP (Minimum Viable Products) app installation and the new Shipping Feature Analyzer among the highlights. . Other advantages:

  • With const Genics MVP, a tool is added for library designers in developing secure APIs at compile time. A hugely expected feature, constant factors are general arguments that range from constant values, rather than types or ages. This allows types to be parameterized by integers, eg. The plan is to introduce constant factors incrementally, so the only types that can be used as a kind of general constant argument are currently integer types, including sizeAnd usizeAnd char, And bool.
  • Besides the static factors, a new API has been installed that uses it, std::array::IntoIter, which allows developers to create an iterator by value on any array.
  • For Cargo, the new feature analyzer introduces an algorithm for computing Package Features To help avoid some unwanted standardization with the existing solution unit.
  • Improved compile times on macOS, with improvements to speed up versions that include debugging information and reduce the amount of disk space used.
  • Elements such as functions, attributes, and structures can be parameterized with constant values ​​as well as types and their lifetimes.
  • Stable APIs, including 18 new install methods for types like slice And Peekable.

New Features in Rust 1.50.0

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

  • For static global array indexing, this release continues to progress toward stability const Medicines, add apps ops::Index And IndexMut for matrices [T; N] for any length Const N. indexing factor [ ] I’ve already worked on arrays through the compiler, but at the type level, arrays haven’t really implemented library attributes yet. Also, the stable use of const The values ​​are formally recognized in the iteration of the matrix.
  • Safe assignments for ManuallyDrop<T> Union fields are allowed.
  • stature for File on Unix platforms. With this feature, some types in Rust have limitations on what is considered a valid value, which may not cover the range of possible memory values. Any remaining valid value is called specialty, with this usable space to improve the layout of the genre. On Unix platforms, Rust’s File It consists of an integer descriptor for system files; This happens to have a potential niche because it can’t be -1! System calls that return the use of a file descriptor -1 To indicate an error occurred, so it can never with -1 To be a real file descriptor. Starting with Rust 1.50, this has been added to the type definition so it can be used in layout optimizations as well. It follows this Option<File> Now it will have the same size File.
  • For shipping, a [rustc-workspace-wrapper] Added option, to set a wrapper to be executed instead of rustcWorkspace members only. Moreover , --workspace Flag added to cargo update Command.
  • Nine new stable functions have been added to the library: bool::thenAnd btree_map::Entry::or_insert_with_keyAnd f32::clampAnd f64::clampAnd hash_map::Entry::or_insert_with_keyAnd Ord::clampAnd RefCell::takeAnd slice::fill, And UnsafeCell::get_mut.
  • Also in the library, many existing functions have been made const: IpAddr::is_ipv4And IpAddr::is_ipv6And Layout::sizeAnd Layout::alignAnd Layout::from_size_alignAnd pow For all kinds of integers, checked_pow For all kinds of integers, saturating_pow For all kinds of integers, wrapping_pow For all kinds of integers, next_power_of_two for all kinds of unsigned integers, and checked_power_of_two For all kinds of integers without a sign.

New Features in Rust 1.49.0

Announced December 31, 2020, Rust 1.49.0 has set 64-bit Arm Linux as a Level 1 target, thus providing the highest guarantee of support, with the full test suite running on this platform on every change that is incorporated into the compiler. This support is expected to benefit workloads spanning from embedded systems to servers and desktops. Pre-built binaries are also available. This is the first time a non-x86 target has reached level 1 support. The Rust development team hopes to bring more platforms to this level in the future.

Also with Rust 1.49.0, 64-bit Arm for macOS and Windows reaches Level 2 support. Developers can expect these two targets to have pre-built installable binaries from rustup. Level 2 targets are guaranteed to build, and pre-made binaries are provided. However, the Rust team does not implement the test suite on those platforms. The produced diodes may not work and may contain errors.

Other additions, improvements, and changes in Rust 1.49.0:

  • Three static functions have been added to the library: slice::select_nth_unstableAnd slice::select_nth_unstable_by, And slice::select_nth_unstable_by_key.
  • Two jobs were done for the library const: Poll::is_ready And Poll::is_pending.
  • As for language, guilds can now implement it Drop And developers can now have a domain in union with ManuallyDrop<T>. Also, unrestricted enums can be converted to integers.
  • Developers can reference and link by moving in patterns, allowing developers to selectively borrow individual components of a type.
  • For the compiler, the minimum supported version of LLVM has been moved to LLVM 9.

New features in Rust 1.48.0

Rust 1.48.0 was revealed on November 19, 2020, and features easy linking in the Rustdoc library documentation tool, with the syntax to notify Rustdoc when developers attempt to link to a type; URLs will be generated. Also in version 1.48.0:

  • Developers can specify #{doc(alias = “<alias>”) ] on items to add search aliases when searching through the Rustdoc UI.
  • The unsafe Keywords are now allowed to be used syntactically in modules. While still morally objectionable, this can now be parsed by procedural macros.
  • In the translator, file -C link-self-contained=<yes|no> The translator flag is stabilized. This tells us rustc Whether to link its own C runtime and libraries or rely on an external linker to find them. This is only supported in windows-gnuAnd linux-musl, And wasi platforms.
  • in the Library , [T; N]: TryFrom<Vec<T>> The API is now stable. Developers can use it to try to convert a vector into an array of a certain length. Also settled in this release are five other APIs: slice::as_ptr_rangeAnd slice::as_mut_ptr_rangeAnd VecDeque::make_contiguousAnd future::pending, And future::ready.
  • Also in the library, all arrays of any length are now implemented TryFrom<Vec<T>>.

New features in Rust 1.47.0

Announced October 8, 2020, Rust 1.47.0 does not contain new language features but enhances the standard library. Quality of life and toolchain improvements as well as library stability are shown in the release. Release Notes Posted for promotion.

The capabilities specified in Rust 1.47.0 include:

New features in 1.46.0

Rust 1.46, announced on August 27, 2020, includes the following capabilities:

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *