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

Remove Microsoft.DotNet.CilStrip.Sources from runtime-assets #383

Open
ViktorHofer opened this issue Nov 8, 2023 · 6 comments
Open

Remove Microsoft.DotNet.CilStrip.Sources from runtime-assets #383

ViktorHofer opened this issue Nov 8, 2023 · 6 comments

Comments

@ViktorHofer
Copy link
Member

https://github.com/dotnet/runtime-assets/blob/main/src/Microsoft.DotNet.CilStrip.Sources/README.md mentions that Microsoft.DotNet.CilStrip.Sources is a temporary copy and will be replaced during .NET 7.

Can these sources now be removed from the repository?

cc @steveisok

@steveisok
Copy link
Member

@akoeplinger @fanyang-mono I think the readme should at least be updated. Do you think we can have an ILStrip replacement in .NET 9?

@fanyang-mono
Copy link
Member

fanyang-mono commented Nov 8, 2023

If the functionality of writing a modified assembly to file and validating the new assembly are implemented, then probably yes.

@lewing
Copy link
Member

lewing commented Feb 9, 2024

what is the status here?

@steveisok
Copy link
Member

This one is tough because modern cecil rewrites tokens and aot images rely on exact values. Here's what I see our options are in .NET 9:

  1. An API like Efficient API to stream from a MetadataReader to a MetadataBuilder with modifications runtime#30443 lands and we're able to use it

  2. @vargaz does something creative with the ILStrip tool emitting a remapping table and the runtime uses it to remap

  3. We do nothing until an adequate API lands

@lewing
Copy link
Member

lewing commented Feb 9, 2024

cc @vitek-karas

@akoeplinger
Copy link
Member

akoeplinger commented Feb 9, 2024

Another (cheap) option that we discussed is using the functionality @fanyang-mono introduced in IlStrip which zeroes out method bodies for all methods instead of a subset, this feature only relies on SRM. It'd make the binary size on disk larger but the compressed size probably stays similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants