CsWinRT
CsWinRT copied to clipboard
Proposal: Proxy/Stub Generation
Summary
One of the biggest gaps between using IDL to generate a WinMD and using CsWinRT is that with IDL proxy/stub marshaling can be used instead of metadata based marshaling (MBM). I would propose exposing support for generating the proxy/stub code.
Rationale
There are cases where proxy/stub marshaling is required making usage of CsWinRT authored components harder
Important Notes
- Technically, you could generate IDL from the WinMD and then use that for the proxy/stub code but that be very hacky and just asking for issues.
Open Questions
- Should the generated code be C# that can just be NativeAOT compiled for usage from native code?
- Or should it be native code from the start?
- Maybe a middle group of generating IDL directly that can just be used to create proxy/stub code from?