I've just come across a need in cargo-gpu to get the exact nature of the shader build failure. Namely that there is an edge case where downgrading spirv-std can cross a Rust toolchain threshold that also changes the manifest version in the shader's Cargo.lock. It'd be good to detect that error and advise the user to just delete the Cargo.lock and rebuild.
I think this would be a breaking change in the API?
I think there'd also be a way to achieve this by parsing the spirv-builder STDERR stream, but that's a bit cumbersome.
I'd be happy to look into adding this.