18 releases (10 breaking)

0.12.0+sdk-1.3.268.0 Dec 20, 2023
0.11.0+1.5.4 Oct 29, 2021
0.10.0+1.5.4 Aug 17, 2021
0.8.0 May 5, 2021
0.1.0 Nov 8, 2016

#29 in Graphics APIs

Download history 908/week @ 2024-03-13 777/week @ 2024-03-20 988/week @ 2024-03-27 634/week @ 2024-04-03 541/week @ 2024-04-10 458/week @ 2024-04-17 742/week @ 2024-04-24 622/week @ 2024-05-01 495/week @ 2024-05-08 528/week @ 2024-05-15 474/week @ 2024-05-22 477/week @ 2024-05-29 486/week @ 2024-06-05 550/week @ 2024-06-12 465/week @ 2024-06-19 274/week @ 2024-06-26

1,822 downloads per month
Used in 20 crates (16 directly)

Apache-2.0

2.5MB
60K SLoC

core of the rspirv project

Crate Documentation

The core crate of the rspirv project providing APIs for processing SPIR-V modules:

  • The whole SPIR-V grammar (instruction layouts and their operands)
  • A data representation of SPIR-V modules and its loader and builder
  • A structured representation of SPIR-V modules (under developing)
  • SPIR-V binary module decoding and parsing functionalities
  • A lifting infrastructure for converting data representation into structured representation.

This crate defines a common SPIR-V data representation (DR) as the medium for various purposes. It also provides a builder to build the DR interactively and a parser to parse a given SPIR-V binary module into its DR. The parser handles decoding and parsing of SPIR-V binary modules according to the grammar, the parsed instructions are sent to the consumer.

The data representation, as the name shows, focuses on presenting the data within a SPIR-V module; a higher level structured representation is currently under developing.

Usage

First add to your Cargo.toml:

[dependencies]
rspirv = "0.12.0"

Examples

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

Dependencies