Este contenido no está disponible en el idioma seleccionado.
Chapter 5. Changes in Rust 1.84.1 Toolset
RHEL provides Rust Toolset in version 1.84.1. Notable enhancements since the previously available version 1.79.0 include:
-
The new
LazyCellandLazyLocktypes delay the initialization until the first use. These extend the earlierOnceCellandOnceLocktypes with the initialization function included in each instance. - The new sort implementations in the standard library improve the runtime performance and compile times. They also try to detect cases where a comparator is not producing a total order, making that panic instead of returning unsorted data.
-
Precise capturing for opaque return types have been added. The new
use<..>syntax specifies the generic parameters and lifetimes used in animpl Traitreturn type. Many new features for
constcode have been added, for example:- Floating point support
-
constimmediates for inline assembly - References to statics
- Mutable reference and pointers
Many new features for
unsafecode have been added, for example:- Strict provenance APIs
-
&rawpointer syntax - Safely addressing statics
-
Declaring safe items in unsafe
externblocks
-
The Cargo dependency resolver is now version aware. If a dependency crate specifies its minimum supported Rust version, Cargo uses this information when it resolves the dependency graph instead of using the latest
semver-compatible crate version.
Compatibility notes:
-
The WebAssembly System Interface (WASI) target is changed from
rust-std-static-wasm32-wasitorust-std-static-wasm32-wasip1. You can select the WASI target also by using the--target wasm32-wasip1parameter on the command line. For more information, see the Changes to Rust’s WASI targets upstream blog post. -
The split panic hook and panic handler arguments
core::panic::PanicInfoandstd::panic::PanicInfoare now different types. -
extern "C"functions abort the process on uncaught panics. Useextern "C-unwind"instead to allow unwinding across ABI boundaries.
Rust Toolset is a rolling Application Stream, and Red Hat only supports the latest version. For more information, see the Red Hat Enterprise Linux Application Streams Life Cycle document.