shader-slang / slang

Making it easier to work with shaders
http://shader-slang.com
MIT License
2.19k stars 187 forks source link

Slang "C" header is not valid C99/C11/C19/C23. #5565

Open moonheart08 opened 5 hours ago

moonheart08 commented 5 hours ago

Self explanatory, slang does not provide any C compatible API at this time, making creation of bindings unnecessarily difficult.

Reproduction

gcc -std=c11 slang.h

csyonghe commented 4 hours ago

Since most of our core APIs are defined as COM interfaces, we are no longer maintaining C compliance for the header right now.

To target C, we will need to parse the existing COM interfaces and code-gen the C bindings for them. We welcome contributions to make this possible.