winrt-rust
winrt-rust copied to clipboard
Expose the DualApiPartition attribute
See https://msdn.microsoft.com/de-de/library/windows/desktop/mt695951(v=vs.85).aspx.
Probably the APIs that don't have the DualApiPartition
attribute should be disabled by default, and enabled only via a feature flag. Currently they won't be of much use anyway, because I know of no way to create a real UWP app with Rust.
Notet that the attribute seems to be only applied to classes, so it's not clear what to to with the corresponding interfaces. Those that are marked ExclusiveTo
should probably be handled in the same way.
I looked into this a little more and found that e.g. the XML DOM classes in Windows.Data.Xml.Dom
don't have the DualApiPartition
attribute, but they can be used from desktop apps just fine ... I'm not sure what this means.
The absence of the DualApiPartition
attribute for a lot of APIs also doesn't really make sense in light of this statement (from https://msdn.microsoft.com/de-de/library/windows/desktop/mt695951(v=vs.85).aspx):
With some notable exceptions, the general rule is that a Universal Windows Platform (UWP) API can be called from a classic desktop app. The two main areas of APIs that are an exception to this general rule are XAML UI APIs, and APIs that require the calling app to have a package identity.