The headers crate for the rspirv project which provides Rust definitions of SPIR-V structs, enums, and constants.
This project uses associated constants, which became available in the stable channel since 1.20. So to compile with a compiler from the stable channel, please make sure that the version is >= 1.20.
First add to your Cargo.toml
:
toml
[dependencies]
rspirv_headers = "1.4"
Then add to your crate root:
rust
extern crate spirv_headers;
Please see the documentation and project's README for examples.