#spirv #struct #enum #definition

spirv_headers

Rust definition of SPIR-V structs and enums

12 stable releases

✓ Uses Rust 2018 edition

1.4.2 Feb 19, 2020
1.4.1 Oct 25, 2019
1.3.4 Sep 17, 2018
1.3.1 Apr 20, 2018
1.1.5 Feb 18, 2017

#29 in Graphics APIs

Download history 90/week @ 2020-01-25 51/week @ 2020-02-01 68/week @ 2020-02-08 136/week @ 2020-02-15 166/week @ 2020-02-22 69/week @ 2020-02-29 100/week @ 2020-03-07 138/week @ 2020-03-14 116/week @ 2020-03-21 84/week @ 2020-03-28 104/week @ 2020-04-04 150/week @ 2020-04-11 101/week @ 2020-04-18 87/week @ 2020-04-25 117/week @ 2020-05-02 296/week @ 2020-05-09

453 downloads per month
Used in 19 crates (6 directly)

Apache-2.0

150KB
3.5K SLoC

spirv-headers of the rspirv project

Crate Documentation

The headers crate for the rspirv project which provides Rust definitions of SPIR-V structs, enums, and constants.

Usage

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:

[dependencies]
rspirv_headers = "1.4"

Then add to your crate root:

extern crate spirv_headers;

Version

Note that the major and minor version of this create is tracking the SPIR-V spec, while the patch number is used for bugfixes for the crate itself. So version 1.4.2 is tracking SPIR-V 1.4 but not necessarily revision 2. Major client APIs like Vulkan/OpenCL pin to a specific major and minor version, regardless of the revision.

Examples

Please see the documentation and project's README for examples.

Dependencies

~165KB