nmangue / NGrib

NGrib is a .NET library to read GRIB (GRid in Binary) files. GRIB is a gridded data standard from WMO (World Meteorological Organisation) and is used by many meteorological organisation. Fork of GribCS.
GNU Lesser General Public License v3.0
17 stars 10 forks source link

AOT support #12

Closed Ignas-StormGeo closed 3 months ago

Ignas-StormGeo commented 9 months ago

Hello.

As GRIB reading needs to be high-performance, ahead-of-time (AOT) compiling helps with that. However it has two clear requirements: .net 8.0 (or 7.0 but it doesn't have LTS) is needed plus the code itself must not have any reflection. Would it be possible to do that for NGrib? More to read: https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/?tabs=net7%2Cwindows

nmangue commented 8 months ago

Hello,

This could be a nice addition. I have done a quick build test and there seems to be no blocking issue. The reflection code NGrib uses, is compatible with AOT (only some specific actions like emitting code is not compatible with AOT). I will have to do more tests and update the Nuget packaging to add a net8 target for it to be releasable.

nmangue commented 3 months ago

Fixed by PR #20