-
Notifications
You must be signed in to change notification settings - Fork 471
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
Provide trimming annotations for self-contained apps #1057
Labels
Milestone
Comments
We may have to switch to the Google.Protobuf library which isn't reflection-based in order to (a) get this working properly, and (b) be able to run in an AOT environment such as what is being planned at the moment for .NET 7. 🤔 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.NET 5 previewed the ability to trim unused code from applications and from the runtime, and .NET 6 now makes that generally available.
Relevant docs are here: https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained
Considering how many protobuf messages we ship that most apps won't use, this is quite valuable. DepotDownloader can trim about 4.5-5 MB away from SteamKit2.dll and a fully self-contained trimmed build of DD is about 15-20MB IIRC.
Related issues:
Some initial prototyping has already been done in this pull request:
The text was updated successfully, but these errors were encountered: