1 unstable release

0.0.1 Feb 22, 2019

#46 in #anything

0BSD license

8KB
95 lines

License:0BSD travis.ci AppVeyor crates.io docs.rs

proc-spirv

A proc-macro crate to get your shaders compiled into SPIR-V at compile time.

Currently, we use the shaderc crate, but that's not considered a "stable" part of the API. Anything that turns GLSL into SPIR-V would work in the long term. If someone comes up with a solid pure-rust GLSL to SPIR-V compiler, we could easily switch to that.

Probably no one will do that because people are lazy.

When To Use This

If you want to have some SPIR-V shader code in your program but you do not need to have your program be compiling new shaders at runtime, you can use this crate's proc-macro instead to do all the processing at compile time only. This makes your final binary smaller, because it's not carrying around a SPIR-V compiler. It also makes your graphics stuff startup faster, because all the shaders don't need to be compiled at runtime.

Dependencies

~2MB
~52K SLoC