winrt-rust
winrt-rust copied to clipboard
Generate parametric interface GUIDs using const fns
We're currently generating all the necessary parametric interface GUIDs ahead of time in the code generator (C#). At least those that are necessary to compile the library. User code might need additional parametric interface instantiations and there's no way for the user to get the required GUIDs. We should instead try to do this from Rust using const fns, once that is ~implemented~ stable.
The C++ WinRT projection is using constexpr to do this: https://www.youtube.com/watch?v=7TdpWB_vRZM#t=23m46s
I started working on this in a branch: https://github.com/Boddlnagg/winrt-rust/tree/constfn-pinterface
However, const fn support is not yet capable of everything that we need for it to work.