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
Trimming #305
Comments
|
Trimming is more suited for the end consumer (application) instead of libraries, as you don't want to prematurely trim away IL for it to blow up on the downstream consumer. |
|
In the article they mention that libraries can (and should if possible) annotate APIs. |
|
I am not open to any trimming operations being done to Silk.NET itself. However, if we needed to annotate some APIs for the new (experimental) trimmer then this should be done no earlier than 3.0. |
|
Could you explain why you don't want this to be (optionally) done in 2.0? |
|
Primarily because as of 2.0 Silk.NET is still a .NET Standard library, and the new trimmer is .NET 5 only. |
|
I see, so you're not happy to multi-target to net5 just for this? |
|
Not for something like this, as it'll be large-scale and files will get messy with lots of preprocessor directives. |
|
Apparently auto trimming is cool, see this tweet from Tanner https://twitter.com/tannergooding/status/1412124486539702272?s=20 |
|
@Perksey Trimming is becoming more of a thing now, not sure your comments aged well. One of those decisions that were perhaps made hastily or without considering trimming to be more mainstream. It's definitely up to the libraries to provide hints, as AOT is more and more a thing. Silk.NET is quite bloaty and trimming would help a lot. |
|
I still stand by all of my comments, it would be a maintenance nightmare for 2.X to annotate everything given the multitargeting. You missed the part where I said we’ll do this in 3.0 and the fact that the issue is still open, so we will do this eventually. But thank you for your opinion. |


In addition to the work done in #303 we should consider trimming. Our assemblies are already very large, so trimming would be of great use.
See https://devblogs.microsoft.com/dotnet/customizing-trimming-in-net-core-5/
The text was updated successfully, but these errors were encountered: