[Windows] Build script crash on 1.95.0: `Os { code: 0, kind: Uncategorized, message: "The operation completed successfully." }`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.2k
- PR merge metrics
- PR metrics pending
Description
I tried this code:
-
Install Rust 1.95.0 on Windows:
rustup install 1.95.0-x86_64-pc-windows-msvc rustup default 1.95.0-x86_64-pc-windows-msvc -
Create a minimal reproduction project:
cargo new repro cd repro -
Cargo.toml:[package] name = "repro" version = "0.1.0" edition = "2021" [dependencies] serde = "1.0" -
src/main.rs:fn main() { println!("Hello"); } -
Run:
cargo check
I expected to see this happen: Compilation succeeds, as it does on Rust 1.88.0 and earlier versions.
Instead, this happened: Build script crashes with the following panic:
called `Result::unwrap()` on an `Err` value: Os {
code: 0,
kind: Uncategorized,
message: "The operation completed successfully."
}
This affects build scripts for multiple popular crates including zerocopy, proc-macro2, quote, and serde_core.
Meta
rustc --version --verbose:
rustc 1.95.0 (59807616e 2026-04-14)
binary: rustc
commit-hash: 59807616e
commit-date: 2026-04-14
host: x86_64-pc-windows-msvc
release: 1.95.0
LLVM version: 20.0
Backtrace
thread 'main' panicked at /rustc/59807616e.../library/std/src/sys/process/mod.rs:65:XX:
called `Result::unwrap()` on an `Err` value: Os {
code: 0,
kind: Uncategorized,
message: "The operation completed successfully."
}
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Additional Context
- OS: Windows 11 (Build 26200)
- Regression: Yes — the same code compiles fine on Rust 1.88.0
- Platform-specific: This appears to be Windows-only. The same Rust 1.95.0 version in WSL (Linux target) does not exhibit this particular error.
- Root cause hypothesis:
std::process::Commandon Windows is misinterpreting a successful Windows API call (code 0) as a failure. - Workaround: Downgrade to
1.88.0-x86_64-pc-windows-msvc
Related Issues (Different Scenarios, Same Error Pattern)
The Os { code: 0, kind: Uncategorized } error pattern has appeared in other contexts, but those were all different root causes:
- oxidecomputer/omicron#8933 — tokio I/O driver on Helios
- l4l/yofi#152 — Wayland compositor on Linux
- tauri-apps/tao#753 — Windows system tray icon handle exhaustion
None of these are related to the build script process crash on Windows with Rust 1.95.0.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction steps using Rust 1.95.0 on Windows and inspect the panic location named in library/std/src/sys/process/mod.rs:65. Compare the behavior with Rust 1.88.0 and the Linux target described in the report. Done means the minimal serde project builds successfully with cargo check on Windows 1.95.0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100