grovesNL / spirv_cross

Safe Rust wrapper around SPIRV-Cross
Apache License 2.0
87 stars 42 forks source link

Wrap C API instead of C++ #99

Open kvark opened 5 years ago

kvark commented 5 years ago

SPIRV-Cross has a C API: https://github.com/KhronosGroup/SPIRV-Cross/blob/master/spirv_cross_c.h We would have less headache if we use it instead of C++ with its STL stuff

grovesNL commented 5 years ago

As mentioned on Gitter, the new SPIRV-Cross C API just wraps the C++ classes, so it's not too different than we're already doing (i.e. still requires all of the C++ dependencies). But we should switch anyway.

The downside of switching away from the current C API is that we'll have to reimplement some of the wasm/JS bindings between Rust<->C API. It's not a big deal but it will take some time. Ideally we could find a way to solve #97 first to avoid redoing these wasm bindings.