Debian Codegraph @

third_party/rust/spirv/README.md

raw
1 spirv-headers of the rspirv project
2 ===================================
3
4 [![Crate][img-crate-headers]][crate-headers]
5 [![Documentation][img-doc-headers]][doc-headers]
6
7 The headers crate for the rspirv project which provides Rust definitions of
8 SPIR-V structs, enums, and constants.
9
10 Usage
11 -----
12
13 This project uses associated constants, which became available in the stable channel
14 since [1.20][rust-1.20]. So to compile with a compiler from the stable channel,
15 please make sure that the version is >= 1.20.
16
17 First add to your `Cargo.toml`:
18
19 ```toml
20 [dependencies]
21 spirv = "0.3.0"
22 ```
23
24 Version
25 -------
26
27 Note that the major and minor version of this create is tracking the SPIR-V spec,
28 while the patch number is used for bugfixes for the crate itself. So version
29 `1.4.2` is tracking SPIR-V 1.4 but not necessarily revision 2. Major client APIs
30 like Vulkan/OpenCL pin to a specific major and minor version, regardless of the
31 revision.
32
33 Examples
34 --------
35
36 Please see the [documentation][doc-headers] and project's
37 [README][project-readme] for examples.
38
39 [img-crate-headers]: https://img.shields.io/crates/v/spirv.svg
40 [img-doc-headers]: https://docs.rs/spirv/badge.svg
41 [crate-headers]: https://crates.io/crates/spirv
42 [doc-headers]: https://docs.rs/spirv
43 [project-readme]: https://github.com/gfx-rs/rspirv/blob/master/README.md
44 [rust-1.20]: https://blog.rust-lang.org/2017/08/31/Rust-1.20.html