Skip to content
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

Open
yaakov-h opened this issue Nov 15, 2021 · 1 comment
Open

Provide trimming annotations for self-contained apps #1057

yaakov-h opened this issue Nov 15, 2021 · 1 comment
Milestone

Comments

@yaakov-h
Copy link
Member

.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:

@yaakov-h yaakov-h added this to the 2.4.0 milestone Nov 15, 2021
@yaakov-h yaakov-h added this to To do in 2.4.0 Release via automation Nov 15, 2021
@yaakov-h yaakov-h mentioned this issue Nov 15, 2021
13 tasks
@yaakov-h
Copy link
Member Author

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
Projects
None yet
Development

No branches or pull requests

2 participants