We already have interop layer into many apple core APIs. Same APIs are used by Xamarin in their managed bindings. It'd be beneficial maintenance and size-wise to extract this code into a library which could be shared with Xamarin SDKs for apple platforms, especially as we can expect this surface to grow in .NET5 context.
The code which would be converted into a separate library and exposed lives today under https://github.com/dotnet/runtime/tree/master/src/libraries/Common/src/Interop/OSX
@jkotas @stephentoub thoughts?
It would be useful to paste the API shape to this issue so that it is understood what it is about.
Description updated
https://github.com/dotnet/runtime/tree/master/src/libraries/Common/src/Interop/OSX
We are intentionally keeping all these Common/Interop files as internal. They are not designed as well-rounded public APIs. They do just what we need to implement the netcoreapp libraries, and nothing else.
If other repos need similar interop types, I think the best approach is copy the part they find useful and customize it for their needs.
That's unfortunate. It's not a large amount of code yet but the code will be duplicated multiple time in all size sensitive apps. We don't need to make this public API we could start with a library and IVT.
Majority of files under Common/src are included in multiple binaries. This is not OSX specific problem. My gut feeling is that the duplication from non-OSX specific files is going to be dominating the overhead, yet it should be pretty small in absolute numbers.
Majority of files under Common/src are included in multiple binaries. This is not OSX specific problem. My gut feeling is that the duplication from non-OSX specific files is going to be dominating the overhead, yet it should be pretty small in absolute numbers.
Most helpful comment
We are intentionally keeping all these Common/Interop files as internal. They are not designed as well-rounded public APIs. They do just what we need to implement the netcoreapp libraries, and nothing else.
If other repos need similar interop types, I think the best approach is copy the part they find useful and customize it for their needs.