The Rust team released an important point update: Rust 1.91.1. While it is a smaller point release, Rust 1.91.1 includes critical fixes for two significant problems that appeared in the previous 1.91.0 release.
If you use Rust, you should definitely upgrade right away! First, let us discuss the key fixes in this new release.
Table of Contents
Two Key Fixes in Rust 1.91.1
Rust 1.91.1 fixes two specific regressions introduced by version 1.91.0.
1. Stopping Wasm Crashes and Silent Corruption
Rust 1.91.1 fixes a serious issue affecting WebAssembly (Wasm) targets.
Wasm targets are different from most Rust targets. Standard Rust targets usually identify symbols just by their name, but Wasm identifies them using both a symbol name and a Wasm module name. People use the #[link(wasm_import_module)] attribute to customize the Wasm module name that an extern block points to.
For example, a user might write this code:
#[link(wasm_import_module = "hello")] extern "C" { pub fn world(); }However, the prior 1.91.0 release caused a regression in how this attribute worked. Consequently, if a user imported the same symbol name from two different Wasm modules across several Rust crates, problems started. This bug caused linker failures during compilation, often showing an "import module mismatch" error.
Furthermore, the issue also led to dangerous runtime errors. It could cause the program to use the wrong function at runtime. This resulted in undefined behavior, including crashes and silent data corruption.
Therefore, Rust 1.91.1 fixes this critical regression and ensures your Wasm builds are reliable again.
2. Fixing Cargo Locking on illumos System
This new release also addresses an oversight concerning the illumos operating system target.
The Cargo build tool locks the target/ directory during a build. Cargo does this to stop different concurrent build processes from messing with each other. If a filesystem (like some networked filesystems) cannot support locking, the OS returns an Unsupported error, and Cargo proceeds without the lock.
Cargo 1.91.0 changed how it handled this locking. It began using the File::lock standard library method, which was stabilized in Rust 1.89.0. However, due to an oversight, the File::lock method always returned Unsupported specifically on the illumos target.
Consequently, Cargo never locked the build directory on illumos, regardless of whether the filesystem actually supported locking or not.
Rust 1.91.1 now fixes this oversight in the standard library. The fix enables the File::lock family of functions on illumos. This action indirectly resolves the Cargo regression for illumos users.
How to Get Rust 1.91.1 Today!
Getting the latest version is simple if you already use rustup. rustup is the tool that helps manage your Rust installation.
To update your current setup, just run this command in your terminal:
rustup update stable
If you previously installed rustup, running rustup update updates your entire installation.
If you don't have Rust, run the following command on Unix-like systems (like macOS, Linux, or Windows Subsystem for Linux) to install it:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
For step-by-step instructions, please check our Rust installation guide.
