Open maxkatz6 opened 3 months ago
Additional issues to track: Xamarin-iOS support for DisableRuntimeMarshalling https://github.com/xamarin/xamarin-macios/issues/15684, seems like they are actively working on this. Couldn't found equivalent Android tracking issue.
Is your feature request related to a problem? Please describe.
There is a relatively new trend in .NET libraries to avoid any interop code that results in runtime marshalling. Doing so theoretically benefits by removing unnecessary runtime dependencies, potentially improving trimming, and enhancing performance. Although it might not result in significant numerical improvements, we can still investigate and pick low-hanging fruits.
Packages that needs to be updated:
[DisableRuntimeMarshalling]
is injected by default to all trimmable projects starting with this PR. But it's explicitly removed on these projects below which still rely on runtime marshalling.Describe the solution you'd like
Fixing these errors is not as trivial and depends on each project. I had a quick look on how solution would look like for different projects:
COM Interop used for Win32 accessibility backend is also a blocker, but we are half-way to rewrite it anyway.
Additional context
Disabled runtime marshalling - important to mention, that this attribute changes default rules for marshalling. Which needs to be addressed especially for Win32 backend.