I have a clean install of Windows, and I mean CLEAN. I decided to format all my drives and install fresh. My setup is mostly the same as my old install on the same box, but with less cruft.
On running cargo build
, everything will download fine, but somewhere in compiling the dependencies Powershell just... closes. I tried piping the outputs of a cargo build -v
to a log file, but it doesn't give any info, just normal outputs that suddenly stops. I've tried most obvious things: I've verified cl.exe
is in my Path, I've tried running Powershell -NoProfile, I've tried it with -NoExit, and I've tried straight up running cargo in cmd
instead of Powershell. I even tried the nightly toolchain, with the same error.
I've also tried setting the execution policy to Unrestricted instead of RemoteSigned, and still no dice. Restarted my computer, reinstalled rustup, etc, nothing helps.
The interesting thing is... cargo seems to actually be completing? Upon navigating back to the directory, no matter where Powershell/cmd crashed, the program is actually built. A simple cargo run
will execute it with no compilation, so it seems like cargo keeps trucking on even after ps/cmd closes.
This will probably turn out to be more of a PS problem than a Rust problem, but cargo
is the only thing I've noticed so far that triggers this behavior. And to make it even odder, this behavior doesn't happen when running cargo build
from the built-in terminal shelling out to powershell in VS Code. Does anyone have any ideas?
(E: Note: nothing shows up in the Windows event viewer)