-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Evaluate cfg-guarding individual extensions #520
Comments
Iirc that, together with removing |
If I understand correctly, that comment discusses only the handwritten front-ends ("manual modules"). Have we explored gating all generated code (including e.g. data structures) as well? |
I guess most of the win is in generated code, which proved difficult to gate for, for example, the video extension. We'll need a restructured generator for that (or lots of passing mutable maps around 😂). |
Considering most projects use a fraction of the extensions, I would hope that we could rely on many smaller extension features. I guess another thing that could be done is to generate structures provided by extensions in a different files? WSI and physical_device_properties2 are the most common extensions I see generally. |
For prior art, fine-grained features have been used to good effect to address this problem in winapi and windows-rs. |
I guess the only confusing issue is that an extension can have a graph of dependencies. Vulkano appears to have done codegen to make that work fine . |
Another thought, we have hand written wrappers for extensions, would moving those to another crate result in any compile time changes? Although this won't allow cargo to compile both crates in parallel. |
Prior art specifically for Ash, on manual helper structures: #483 (comment) 0.5s win over a ±7.5s build wasn't a whole lot, and some of it caused by disabling IMHO this is a nice thing to have. Just like windows-rs we can use the extension "dependencies" in In my eyes we should then also go the whole way and separate out Vk 1.0/1.1/1.2/1.3 too: not just traits for the manual wrappers, but everything (as discussed before). |
The number of extensions is stacking up a lot, and any one application won't use most of them. We should investigate how much build time we could save by making them opt-in. A good baseline would be to compare the current build with one that uses only the typical collection of desktop WSI extensions.
The text was updated successfully, but these errors were encountered: