gir.core
gir.core copied to clipboard
Consider LibraryImport over DllImport?
https://learn.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke-source-generation
LibraryImport could perhaps improve string marshaling and is source generated. Available with dotnet 7.
This allows to use pretty flexible custom marshallers:
- https://learn.microsoft.com/en-us/dotnet/standard/native-interop/tutorial-custom-marshaller
- https://learn.microsoft.com/en-us/dotnet/standard/native-interop/custom-marshalling-source-generation?source=recommendations
This could be handy to implement aliases which is needed for #757.
Requires .NET7