help wanted
Description
I'm opening this issue to investigate the possibility of linking shaderc dynamically. It's by far the biggest time consumer in nannous build times. But all it's doing is compiling a c library which we should be able to install as a system library and just link against. Things to consider:
- How do we build it the first time? Perhaps we make a small crate that compiles and installs it as a system library.
- How to check if it's already installed. I think maybe the same crate could check if it's already installed and only compile if it isn't. Something similar to moltenvk_deps.
- What if shaderc get's an update. We might need a way to check if this happens and recompile. I'm not sure how this is currently handled. I think it's pulling the source as a submodule from git.
- How to tell vulkano not to just compile shaderc. (And any other crates that use it) We might need a PR to vulkano as well but maybe there is someway to tell shaderc-rs to check for system libraries first.
I'll try and get to this soon but I'm pretty busy with other stuff. This would be a good issue for anyone with cmake experience and I'm happy to help with the build.rs stuff. Probably not a good first issue.
I think the best place to start is to see if there is a way to achieve this with the current setup by passing a feature flag to shaderc-rs or something similar.