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

Windows: Statically linked C runtime #11589

Merged
merged 3 commits into from
May 29, 2024
Merged

Conversation

T-256
Copy link
Contributor

@T-256 T-256 commented May 28, 2024

Summary

Here is a comparison between 0.4.6 released binaries (dynamic-crt) and current PR binaries (static-crt):

TARGET dynamic size static size increased size
aarch64-pc-windows-msvc 7.32 MB 7.36 MB 0.04 MB
i686-pc-windows-msvc 7.14 MB 7.2 MB 0.06 MB
x86_64-pc-windows-msvc 7.85 MB 7.91 MB 0.06 MB

Uncompressed binaries:

TARGET dynamic size static size increased size
aarch64-pc-windows-msvc 19.5 MB 19.6 MB 0.1 MB
i686-pc-windows-msvc 18.5 MB 18.6 MB 0.1 MB
x86_64-pc-windows-msvc 23 MB 23.1 MB 0.1 MB

Closes #11503

@T-256 T-256 marked this pull request as ready for review May 28, 2024 23:20
.cargo/config.toml Outdated Show resolved Hide resolved
@T-256 T-256 changed the title Statically linked C runtime Windows: Statically linked C runtime May 28, 2024
@charliermarsh
Copy link
Member

@BurntSushi - tagging you in here too.

@charliermarsh charliermarsh added the windows Specific to the Windows platform label May 29, 2024
@charliermarsh
Copy link
Member

That size increase looks totally reasonable to me.

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @T-256 for working on this.

We also support aarch64 windows target, should I include it in this PR?

Yes, I think it would be good if all windows versions are built the seme way.

@MichaReiser MichaReiser merged commit 5f976ca into astral-sh:main May 29, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Specific to the Windows platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: Microsoft Visual C++ 2015 Redistributable is required on Windows
4 participants