Rust 1.91.1: Patch Release Critica - Release Novembre 2025
Scopri Rust 1.91.1: fix WebAssembly cross-crate symbols, risoluzione file locking illumos, e correzioni critiche dalla 1.91.0 di novembre 2025.

Rust 1.91.1 Γ¨ stato rilasciato il 10 novembre 2025. Questa patch release corregge due regressioni critiche introdotte nella 1.91.0: il fix WebAssembly cross-crate symbols e il ripristino del file locking su illumos. Update consigliato per tutti!
π― Fix Principali
WebAssembly Cross-Crate Symbols Fix
Risolto bug critico wasm_import_module attribute!
Il Problema (1.91.0)
// β Rust 1.91.0 - BROKEN!
// crate A
#[link(wasm_import_module = "custom_env")]
extern "C" {
fn external_function(x: i32) -> i32;
}
// crate B (depends on A)
pub fn use_external() {
// β Linker error o runtime crash!
let result = external_function(42);
}
Cosa causava:
- π΄ Linker errors durante compilazione cross-crate
- π΄ Runtime crashes se linking riusciva
- π΄ Data corruption da symbol mismatch
La Soluzione (1.91.1)
// β
Rust 1.91.1 - FIXED!
// crate A
#[link(wasm_import_module = "custom_env")]
extern "C" {
fn external_function(x: i32) -> i32;
}
// crate B (depends on A)
pub fn use_external() {
// β
Funziona correttamente!
let result = external_function(42);
}
Background tecnico:
WebAssembly identifica symbols con doppia identificazione:
;; Symbol identification in Wasm
(import "module_name" "symbol_name" ...)
^^^^^^^^^^^ ^^^^^^^^^^^
Wasm module Symbol name
Differenza con altri targets:
| Target | Symbol ID | Example |
|---|---|---|
| Linux/Mac/Windows | Nome solo | external_function |
| WebAssembly | Modulo + Nome | ("env", "external_function") |
Il bug 1.91.0:
L'attributo #[link(wasm_import_module)] non propagava correttamente attraverso crate boundaries:
// Crate A definisce
#[link(wasm_import_module = "custom")] // Module = "custom"
// Crate B riceveva
// Module = "env" (default errato!) β
// Risultato: symbol mismatch β linker error
illumos File Locking Fix
Ripristinato file locking per Cargo su illumos!
Il Problema (1.91.0)
# β Cargo 1.91.0 su illumos
cargo build
# Internamente:
# File::lock() β sempre Unsupported β
# Cargo β nessun lock su target/ β
# Risultato: possibili race conditions! π΄
Conseguenze:
- π΄ Concurrent builds potevano corrompere artifacts
- π΄ Build instabili su illumos
- π΄ Race conditions su shared filesystems
La Soluzione (1.91.1)
// β
Rust 1.91.1 - File::lock restored
use std::fs::File;
let file = File::create("lockfile")?;
// β
Su illumos ora funziona correttamente!
file.lock_exclusive()?;
// Fa il build
file.unlock()?;
Background tecnico:
Cargo 1.91.0 migration:
// Prima (custom code)
#[cfg(target_os = "illumos")]
fn lock_directory(path: &Path) -> Result<Lock> {
// Custom OS API calls β
}
// Dopo 1.91.0 (standard library)
fn lock_directory(path: &Path) -> Result<Lock> {
let file = File::open(path)?;
file.lock_exclusive()?; // β Sempre Unsupported su illumos!
Ok(Lock { file })
}
Il bug: File::lock_exclusive() non era implementato correttamente per illumos!
// std/src/sys/unix/fs.rs (simplified)
#[cfg(target_os = "illumos")]
impl File {
fn lock_exclusive(&self) -> io::Result<()> {
// β Rust 1.91.0
Err(io::Error::new(io::ErrorKind::Unsupported, "not supported"))
// β
Rust 1.91.1
// Implementazione corretta con fcntl/flock
}
}
Fix 1.91.1:
- β
Implementata corretta chiamata
fcntl()per illumos - β File locking ora funzionale su filesystem supportati
- β
Cargo puΓ² lockare
target/correttamente
π Context: Rust 1.91.0 Features
Per riferimento, le feature principali di 1.91.0 (30 Ottobre 2025):
aarch64-pc-windows-msvc β Tier 1
# β
Pieno supporto Windows ARM64
rustup target add aarch64-pc-windows-msvc
# Garantiti:
# - Full test suite su ogni commit
# - Prebuilt binaries disponibili
# - Supporto production-ready
Dangling Raw Pointer Lint
// β οΈ Warn by default
fn get_pointer() -> *const i32 {
let x = 42;
&x as *const i32 // β οΈ Warning: returning pointer to local!
}
// β
Correct patterns
fn get_pointer_safe() -> *const i32 {
Box::leak(Box::new(42)) as *const i32
}
static VALUE: i32 = 42;
fn get_static_pointer() -> *const i32 {
&VALUE as *const i32
}
Stabilized APIs (1.91.0)
use std::path::Path;
use std::sync::atomic::{AtomicPtr, Ordering};
// Path absolute/normalize
let path = Path::new("./src/../main.rs");
let absolute = path.canonicalize()?; // β
Stabilized
// Atomic pointer methods
let ptr = AtomicPtr::new(Box::leak(Box::new(42)));
let old = ptr.swap(std::ptr::null_mut(), Ordering::SeqCst);
// Integer methods
let n: i32 = -42;
let abs = n.unsigned_abs(); // β
Returns u32
π Upgrade
Installazione/Update
# Update esistente
rustup update stable
# Da zero
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Verifica versione
rustc --version
# rustc 1.91.1 (stable)
Migrazione da 1.91.0
# 1. Update Rust
rustup update stable
# 2. Clean e rebuild (risolve Wasm/illumos issues)
cargo clean
cargo build
# 3. Verifica fix Wasm (se usi Wasm target)
cargo build --target wasm32-unknown-unknown
# 4. Test completo
cargo test
Chi Deve Upgradare SUBITO
π΄ CRITICO - Upgrade immediato:
- β WebAssembly projects con cross-crate symbols
- β illumos users (Cargo builds instabili)
- β
Progetti usando
#[link(wasm_import_module)]
π‘ CONSIGLIATO:
- β Tutti i progetti Rust in production
- β CI/CD pipelines
- β Shared development environments
Testing Post-Upgrade
# Test Wasm fix
cargo build --target wasm32-unknown-unknown --release
wasm-bindgen target/wasm32-unknown-unknown/release/my_crate.wasm
# Test illumos fix (su illumos)
cargo build -j 4 # Concurrent builds dovrebbero funzionare
# Integration tests
cargo test --workspace
π‘ Conclusioni
Rust 1.91.1 Γ¨ una patch release critica:
β WebAssembly fix - Cross-crate symbols funzionanti β illumos fix - File locking ripristinato β Stability - Regressioni 1.91.0 risolte β Production ready - Safe per deploy immediato β Backward compatible - Drop-in replacement
Impatto:
| Issue | SeveritΓ | Impatto | Fix |
|---|---|---|---|
| Wasm symbols | π΄ CRITICO | Linker errors, crashes | β Risolto |
| illumos locking | π΄ CRITICO | Build corruption | β Risolto |
Timeline:
- 30 Ottobre 2025: Rust 1.91.0 released (con bugs)
- 10 Novembre 2025: Rust 1.91.1 released (fix critici)
Prossimi rilasci:
- 11 Dicembre 2025: Rust 1.92.0 (scheduled)
- 22 Gennaio 2026: Rust 1.93.0 (scheduled)
Action items:
# 1. Update NOW
rustup update stable
# 2. Rebuild projects
cargo clean && cargo build
# 3. Run tests
cargo test
# 4. Deploy with confidence! π