#spir-v

unmaintained spirv_headers

Rust definition of SPIR-V structs and enums

13 stable releases

1.5.1 May 5, 2021
1.5.0 Aug 22, 2020
1.4.2 Feb 19, 2020
1.4.1 Oct 25, 2019
1.1.5 Feb 18, 2017

#79 in #spir-v

Download history 1000/week @ 2024-07-22 1071/week @ 2024-07-29 998/week @ 2024-08-05 2612/week @ 2024-08-12 1109/week @ 2024-08-19 1473/week @ 2024-08-26 1103/week @ 2024-09-02 811/week @ 2024-09-09 902/week @ 2024-09-16 1269/week @ 2024-09-23 911/week @ 2024-09-30 251/week @ 2024-10-07 847/week @ 2024-10-14 784/week @ 2024-10-21 869/week @ 2024-10-28 743/week @ 2024-11-04

3,274 downloads per month
Used in 125 crates (6 directly)

Apache-2.0

180KB
4K 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]
spirv_headers = "1.5"

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

~175–420KB