Developers should be vigilant when switching to the new stable version of the Rust programming language, 1.84.0. Fortunately, this version also offers a lot of new features.
The development team behind Rust recently introduced version 1.84.0. This version contains many new features, more later in this article.
However, developers should be alert for appropriate updates before implementing this new version. A name change in the WebAssembly System Interface (WASI) target may cause their toolchains to crash.
Developers may receive an error message when upgrading Rust because the target wasm32-wasi is no longer available. This is because this target was renamed to wasm32-wasip1 in the previous version, Rust 1.71.
Reason for name change
The reason is that a wasm32-wasip2 target already existed, consistent with the major releases of WASI. Naming the original target wasm32-wasi, when it was still in preview turned out to be a mistake. This name concealed the fact that it was a snapshot of an interface still under development.
The solution to the problem is to run the code rustup target remove wasm32-wasi before developers upgrade to version 1.84.0.
By the way, developers were warned in April last year that this change was coming and were given eight months to switch to the new target name.
New functionality in Rust
Despite this complication, version 1.84.0 offers interesting new functionality. For example, the minimally supported Rust version (MSRV) is now stable for the official package manager Cargo. However, this is not enabled by default. When a new package requires a newer version of Rust, Cargo can automatically ignore it.
The latest Rust version also shows progress in the next-generation trait solver for so-called “type” elements. According to the developers, this solver should fix long-standing bugs, enable future improvements in the type system and improve compile times. The new solver is not yet complete but is already being used for coherence checking.
In addition, Rust is introducing new APIs for strict provenance checking of pointers, such as when converting pointers to integers and vice versa. Tools such as Miri, which detects undefined behaviour in Rust, should benefit from this. The APIs also contribute to the formal correctness of Rust code.
Rust version 1.84.0 is now available.