Runtime: Introduce apple interop library

Created on 27 Feb 2020  路  6Comments  路  Source: dotnet/runtime

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?

area-System.Runtime.InteropServices os-mac-os-x untriaged

Most helpful comment

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.

All 6 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jzabroski picture jzabroski  路  3Comments

iCodeWebApps picture iCodeWebApps  路  3Comments

bencz picture bencz  路  3Comments

chunseoklee picture chunseoklee  路  3Comments

nalywa picture nalywa  路  3Comments