Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native AOT fully compatibility #251

Open
hadashiA opened this issue Mar 15, 2024 · 0 comments
Open

Native AOT fully compatibility #251

hadashiA opened this issue Mar 15, 2024 · 0 comments

Comments

@hadashiA
Copy link
Contributor

Building with Native AOT actually works for the most part.
However, it seems that warnings occur because the compiler does not guarantee the operation.

/Users/s24061/dev/MemoryPack/src/MemoryPack.Core/bin/Release/net8.0/MemoryPack.Core.dll : warning IL2104: Assembly 'MemoryPack.Core' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries [/Users/s24061/dev/MemoryPack/sandbox/SandboxConsoleApp/SandboxConsoleApp.csproj]
/Users/s24061/dev/MemoryPack/src/MemoryPack.Core/bin/Release/net8.0/MemoryPack.Core.dll : warning IL3053: Assembly 'MemoryPack.Core' produced AOT analysis warnings. [/Users/s24061/dev/MemoryPack/sandbox/SandboxConsoleApp/SandboxConsoleApp.csproj]

If we add <IsAotCompatible>true</IsAotCompatible> to MemoryPack.Core.csproj, will see many warnings of the following types:

  • IL2072
  • IL2090
  • IL2091
  • IL3050

To fix this, it may be necessary to change to a mechanism that does not use reflection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant