Closed
Description
This is a tracking issue for what I've been calling the "build system", but in reality the full task list is larger than just that.
In general, this is a group of related issues that would be great for someone other than me to own and drive forwards. These tasks are spread across various "functionality levels", see that issue for more information.
- Create a crate to be used by users build.rs, that takes a path to a shader crate and spits back a spir-v binary that can be
include!
d (or perhaps a better designed version of this). I've created an extremely rough and minimally-featured prototype in the spirv-builder crate - we need to expand it quite a bit, in both robustness and features. - Integrate spirv-opt and spirv-val into statically linkable libraries that are included in rustc_codegen_spirv. This means the user will not have to install spirv-tools on their system. Tracking issue: Add bindings for spirv-opt #31
- Generate host-side bindings, tracking issue: Ergonomic Rust CPU to Rust GPU / SPIRV bindings #10. I like the approach of "SYCL compiles down it's GPU side C++ code along with some side-cart metadata first, this metadata is then converted into regular host side C++". This means that rustc_codegen_spirv would spit out some form of metadata for what bindings are in the module, and then the build.rs helper crate would generate rust source files from that metadata. (Or perhaps rustc_codegen_spirv would spit out rust files directly and the builder would just include them, but, whatever, exact behavior to be determined later. Having multiple backends - e.g. ash and vulkano both - complicates this.)
- Possibly adding any hooks/etc. to that generated code to enable the rendergraph/flamegraph support.