dlemstra / Magick.NET

The .NET library for ImageMagick
Apache License 2.0
3.42k stars 413 forks source link

Add support for linux-musl-arm64 #1688

Open rpendleton opened 1 month ago

rpendleton commented 1 month ago

Is your feature request related to a problem? Please describe

For cost savings, I tend to use arm64 on AWS for both EC2 and Lambda. With Lambda especially, I also prefer to use smaller base containers, such as Alpine Linux, which tend to use musl instead of glibc.

It appears that this package supports Linux on the following runtimes:

However, notably, support for linux-musl-arm64 is missing. This means I can't use this package with Alpine containers on arm64 execution environments.

Describe the solution you'd like

I'd like this package to support linux-musl-arm64. I imagine this would involve updating build scripts and creating new packages specifically for linux-musl-arm64, as well as adding those libraries to the AnyCPU versions. I'm not sure how much additional work would be required since arm64 and musl are already supported separately though.

Describe alternatives you've considered

The only alternative I'm aware of is to either switch back to x64 hosts, or to switch from Alpine Linux to something more standard such as Debian. The first option results in increased costs on AWS due to more expensive instances or Lambda pricing, and the second option results in slower cold starts on AWS Lambda due to larger layer sizes.

Additional context

No response

dlemstra commented 1 month ago

Support for this can probably be added to the pipelines of the Magick.Native pipeline. This can probably be done with cross platform building but I right now don't have the hardware to test if it works. I don't know how much extra work this is going to be but it's probably going to take me a couple days. I don't know when I will have/make time to add support for this.