Cargo build hung on compiling import (without reporting error once interrupted)

⚓ Rust    📅 2026-02-21    👤 surdeus    👁️ 4      

surdeus

After adding rand = "0.8.5" to the Cargo.toml (following along with the rust book chapter 2) and doing cargo build the process got stuck at 'Compiling ppv-lite86 v0.2.21'. After a full five minutes with no CPU activity in task manager I used 'ctrl+Z' and the build completed with NO ERRORS! I went back and tried rerunning cargo build but as far as rust is concerned nothing needs to be done.

Running the guessing_game code with a call to rand::thread_rng().gen_range(1..100), appears to run fine but that says nothing about the reliability of the rest of the code imported with rand. Whether interrupting the hung compilation caused corruption or not is only part of my concern, the build would have happily sat there overnight waiting for Ctrl+Z completely hosing any automation chains!

Was this a random lightning event, newby error? have others experience or can explain this?

3 posts - 2 participants

Read full topic

🏷️ Rust_feed