# KhronosGroup/SPIRV-Cross

SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.

Repository: https://github.com/KhronosGroup/SPIRV-Cross
Canonical: https://ross.abutalabs.com/products/spirv-cross
Language: GLSL
License: Apache-2.0
License Family: permissive
Last push: 2026-07-31T13:06:58+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 95, release rhythm 8, longevity 100
- inputs: {"age_days": 3803, "days_push": 33, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2493, forks 702 (observed 2026-08-28T04:06:56.485006+00:00)

## What it is
SPIRV-Cross is a tool and C++ library from Khronos for parsing SPIR-V binaries, performing reflection, and decompiling them back to high-level shader languages like GLSL, HLSL, and Metal Shading Language. It also emits JSON reflection data and provides APIs for building Vulkan pipeline layouts.

## Use cases
- convert SPIR-V bytecode back to readable GLSL
- translate SPIR-V shaders to Metal Shading Language for iOS/macOS
- decompile SPIR-V to HLSL for Direct3D
- reflect on SPIR-V to build Vulkan pipeline layouts
- dump shader reflection metadata as JSON
- port Vulkan shaders to Metal or DirectX

## When to choose
- you need to consume SPIR-V and emit human-readable shader source
- you are building a Vulkan-to-Metal or Vulkan-to-D3D translation layer
- you need shader reflection to set up Vulkan descriptor sets and pipeline layouts
- you want a mature, Khronos-maintained C++ library with wide platform support

## When to avoid
- you only need to compile high-level shaders to SPIR-V (use glslang or DXC instead)
- you need the deprecated C++ shader output feature
- you want a runtime shader compiler rather than a cross-compiler/decompiler

## Facets
- artifact type: library
- maturity: stable
- function: compiler, parser, developer-tools
- domain: graphics, developer-tools, compilers
- platform: windows, cross-platform, cpp
- tags: spir-v, shader-translation, glsl, hlsl, metal-shading-language, vulkan, reflection, disassembler, khronos, game-development, linux, macos, android, ios

## Member repositories
- KhronosGroup/SPIRV-Cross (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:56.485006+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:27:18.098970+00:00, confidence not recorded.
  - readme: https://github.com/KhronosGroup/SPIRV-Cross (fetched 2026-08-28T04:06:56.485006+00:00, sha 9830e259af2d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
