SPIR-V binding tool open sourced?

Hi Kronos members! I just saw SPIR-V header was defined using a lot of langage.

Any hope to have a Rust binding? Something like spirv.rs?

I guess you use some tools to automatically generate SPIR-V binding in those various langages. If such tool would be in Github you would maybe have some help to generate SPIR-V binding for huge amount of langage.

You could just use the XML file to generate your own. That’s where the headers come from to begin with.

Those are not SPIR-V “bindings”. They’re just giving human readable names to the various integers used in SPIR-V.

I’m sure you can write a very simple script to convert the JSON/Python/Lua version into whatever language you want. Those are just tables for those languages, so parsing them is trivial (you can literally just compile and execute them in JavaScript/Python/Lua scripts to get the data).

You’re right, it’s not “binding”.

Ok, I will write a tiny script. :slight_smile: