-
Notifications
You must be signed in to change notification settings - Fork 542
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
[FEATURE] Publish SkiaSharp package specifically for use in (ASP).NET Core #1241
Comments
Even better. Make native assets an extra package like the Linux version. Problem solved. |
That is the plan. |
The future with net5 will only have a single assembly and we will do something about the multiple native assets. For now, yeah, we could split the packages. Can you not just publish for a specific runtime? You already know where you are going to be running, so no need to have it all. Or are you not creating the docker image? |
That is what is happening today. But this thread is about "tomorrow". I would like to be able to Let's just say that we want to optimize publish size for newbies who are not familiar / care with runtime identifiers. |
Closing this as a duplicate of #1301 Even though this issue was first, it was around the idea of ASP.NET. Some changes were made to no longer embed the native files inside the assemblies (#1296) but this actually made this issue worse unfortunately. However, the actual work was done so we can either move files around or into separate packages. I am not sure exactly why the process will be, but I hope to do some cleanup in v2.80.1. The other reason this is not so easy with the case of "remove non-ASP.NET" is that .NET 6 is also going to be a |
Is your feature request related to a problem? Please describe.
SkiaSharp package size is MASSIVE.
At 88MB + 3MB Linux native package, it's quite taxing on developer machine and build system (CI/CD), often times causing build times to be delayed due to the package download size AND eating build time quota (e.g. GitHub Actions minutes per month).
Also, the final app publish size will also be larger by default, (unless the developer uses self-contained build with explicit Runtime ID) which is not ideal:
Describe the solution you'd like
I wish there is another SkiaSharp package by the Mono / SkiaSharp / Microsoft team for use specifically in ASP.NET Core. (e.g.
SkiaSharp.AspNetCore
)This new package should just consist of these native assets:
And the package should just target .NET Standard for optimal package size. (No .NET Framework and other junks, since the unified .NET 5 is coming up anyway. In the future change the target to .NET 5)
I did a rough estimate of the .nupkg size with only those runtime IDs and only .NET Standard. It should come out at only 12MB total ❗ ❗ ❗
This new package should play nicely with .NET Core Runtime Deps for Docker: https://hub.docker.com/_/microsoft-dotnet-core-runtime-deps/ or ASP.NET Core for Docker: https://hub.docker.com/_/microsoft-dotnet-core-aspnet/ images for building general web apps and microservices.
It'll also be nice if this happens, as there will be a image processing library "blessed" for use in ASP.NET Core apps.
Describe alternatives you've considered
Magick.NET offers such package at 21 MB size https://www.nuget.org/packages/Magick.NET-Q8-x64/ or 46 MB size https://www.nuget.org/packages/Magick.NET-Q8-AnyCPU/
Additional context
Related issue #453
The text was updated successfully, but these errors were encountered: