#spir-v #opencl #vulkan #opengl

tracel-rspirv

Rust library APIs for SPIR-V module manipulation

2 releases

new 0.12.1+sdk-1.4.341.0 Feb 4, 2026
0.12.0 Oct 24, 2025

#108 in Graphics APIs

Download history 146/week @ 2025-10-20 566/week @ 2025-10-27 432/week @ 2025-11-03 322/week @ 2025-11-10 328/week @ 2025-11-17 493/week @ 2025-11-24 538/week @ 2025-12-01 584/week @ 2025-12-08 662/week @ 2025-12-15 913/week @ 2025-12-22 986/week @ 2025-12-29 1142/week @ 2026-01-05 1125/week @ 2026-01-12 957/week @ 2026-01-19 2453/week @ 2026-01-26 2136/week @ 2026-02-02

6,752 downloads per month
Used in 4 crates (via cubecl-spirv)

Apache-2.0

3MB
83K 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