winrt-rust icon indicating copy to clipboard operation
winrt-rust copied to clipboard

Generate parametric interface GUIDs using const fns

Open Boddlnagg opened this issue 7 years ago • 1 comments

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

Boddlnagg avatar Dec 08 '17 22:12 Boddlnagg

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.

Boddlnagg avatar Feb 28 '19 17:02 Boddlnagg