EmbarkStudios/rust-gpu

Minor Bug: Misleading error message when compile succeeds but no *.spv was found

Firestar99 opened this issue · 1 comments

If you compile a crate with rust-gpu but forget to add

[lib]
crate-type = ["lib", "dylib"]

in it's cargo.toml rust-gpu will error out with: Artifact created when compilation succeeded.
This Error is outright wrong: What actually happened is that compilation succeeded but NO *.spv artifact was found.

The error is thrown in crates/spirv-builder/src/lib.rs line 538, at the end of the invoke_rustc() method.
I'd like to suggest replacing this message with Compilation succeeded but no .spv Artifact was created! Make sure the crate-type includes \"dylib\".

oisyn commented

Thank you for reporting this.