Open koodikone opened 3 years ago
glsl_to_spirv
dependency is one only used for one example, being raw-window-handle-with-wgpu
, which is pretty specific. If you want to fix it, I think you can try to disable this example at compile time (until glsl_to_spirv
is fixed upstream), and put the glsl_to_spirv
as an optionnal dev-dependency in Cargo.toml.
In the meantime, this compilation error should only happen when you compile a demo directly from this crate. If you copy paste the demo code into a new project a put rust-sdl2 as a dependency, you might get another error but at least you won't get the same one for sure.
Great! If I remove "glsl_to_spirv" as devdependency, it compiles and works! However, will it ever get fixed upstream? Isn't glsl_to_spirv deprecated?
Indeed, rather than fixing it upstream, we would need to change glsl_to_spirv
dev-dependency to shaderc-rs
, adapt the code and hope it works for your platform then.
I am unable to compile rust-sdl2 (0.34.4) examples on Freebsd 12.2 and 13.0. The culprit seem to be "glsl-to-spirv-0.1.7" crate which Clang is not happy about.
Command: cargo run --example=demo
Error log: