Rust: Rust platform size (round 2)

Created on 11 Oct 2019  路  8Comments  路  Source: rust-lang/rust

Reopening this issue as its not fixed. On my last post in July the size was
294 MB:

https://github.com/rust-lang/rust/issues/61978#issuecomment-509259209

comically, its actually larger now at 347 MB:

https://static.rust-lang.org/dist/rust-nightly-x86_64-pc-windows-gnu.msi

C-enhancement I-heavy T-compiler

Most helpful comment

To give a table like https://github.com/rust-lang/rust/issues/61978#issuecomment-509011699 :

| file name | dbeed58adee2ef046b46b252980f86672f9bfc4c (prior to #59800 merge) | 898f36c83cc28d7921a1d7b3605323dc5cfcf533 (prior to #64823 merge) | 000d90b11f7be70ffb7812680f7abc6deb52ec88 (after #64823 merge) |
| - | - | - | - |
| rustc-nightly-x86_64-unknown-linux-gnu.tar.gz | 122 073 207 | 101 219 999 | 101 214 839 |
| rust-std-nightly-x86_64-unknown-linux-gnu.tar.gz | 82 951 040 | 215 628 828 | 25 056 035 |
| cargo-nightly-x86_64-unknown-linux-gnu.tar.gz | 6 751 312 | 6 827 556 | 6 834 296 |
| rustc-nightly-x86_64-pc-windows-msvc.tar.gz | 82 391 063 | 61 214 933 | 61 228 366 |
| rust-std-nightly-x86_64-pc-windows-msvc.tar.gz | 74 663 690 | 222 313 575 | 20 421 375 |
| cargo-nightly-x86_64-pc-windows-msvc.tar.gz | 4 450 362 | 4 526 714 | 4 528 683 |

Created by the commands (with some manual formatting afterwards):

export TOOLS="rustc-nightly-x86_64-unknown-linux-gnu.tar.gz rust-std-nightly-x86_64-unknown-linux-gnu.tar.gz cargo-nightly-x86_64-unknown-linux-gnu.tar.gz rustc-nightly-x86_64-pc-windows-msvc.tar.gz rust-std-nightly-x86_64-pc-windows-msvc.tar.gz cargo-nightly-x86_64-pc-windows-msvc.tar.gz"

for TOOL in $TOOLS; do printf "| $TOOL |"; for COMMIT in 898f36c83cc28d7921a1d7b3605323dc5cfcf533 000d90b11f7be70ffb7812680f7abc6deb52ec88; do curl -I -s https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rustc-builds/${COMMIT}/${TOOL} | rg Content-Length | tr -d '\r' | tr -d '\n' | sed 's/.*: //;s/\(.*\)/ \1 |/'; done; echo ; done

So we had some really nice reductions thanks to #64823, even if you compare with the state before #59800.

All 8 comments

The installer's origin states it was created on 10/10/2019 6:48 PM, which is hours before #64823 merged. The artifact sizes of that PR match up with its description. Check on it again tomorrow?

Hi, using the master toolchain https://github.com/kennytm/rustup-toolchain-install-master I can confirm that it downloads
65.83 MB rustc-nightly-x86_64-unknown-linux-gnu.tar.xz
and
17.59 MB rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz
now (the latter was around 10 times that previously).

To give a table like https://github.com/rust-lang/rust/issues/61978#issuecomment-509011699 :

| file name | dbeed58adee2ef046b46b252980f86672f9bfc4c (prior to #59800 merge) | 898f36c83cc28d7921a1d7b3605323dc5cfcf533 (prior to #64823 merge) | 000d90b11f7be70ffb7812680f7abc6deb52ec88 (after #64823 merge) |
| - | - | - | - |
| rustc-nightly-x86_64-unknown-linux-gnu.tar.gz | 122 073 207 | 101 219 999 | 101 214 839 |
| rust-std-nightly-x86_64-unknown-linux-gnu.tar.gz | 82 951 040 | 215 628 828 | 25 056 035 |
| cargo-nightly-x86_64-unknown-linux-gnu.tar.gz | 6 751 312 | 6 827 556 | 6 834 296 |
| rustc-nightly-x86_64-pc-windows-msvc.tar.gz | 82 391 063 | 61 214 933 | 61 228 366 |
| rust-std-nightly-x86_64-pc-windows-msvc.tar.gz | 74 663 690 | 222 313 575 | 20 421 375 |
| cargo-nightly-x86_64-pc-windows-msvc.tar.gz | 4 450 362 | 4 526 714 | 4 528 683 |

Created by the commands (with some manual formatting afterwards):

export TOOLS="rustc-nightly-x86_64-unknown-linux-gnu.tar.gz rust-std-nightly-x86_64-unknown-linux-gnu.tar.gz cargo-nightly-x86_64-unknown-linux-gnu.tar.gz rustc-nightly-x86_64-pc-windows-msvc.tar.gz rust-std-nightly-x86_64-pc-windows-msvc.tar.gz cargo-nightly-x86_64-pc-windows-msvc.tar.gz"

for TOOL in $TOOLS; do printf "| $TOOL |"; for COMMIT in 898f36c83cc28d7921a1d7b3605323dc5cfcf533 000d90b11f7be70ffb7812680f7abc6deb52ec88; do curl -I -s https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rustc-builds/${COMMIT}/${TOOL} | rg Content-Length | tr -d '\r' | tr -d '\n' | sed 's/.*: //;s/\(.*\)/ \1 |/'; done; echo ; done

So we had some really nice reductions thanks to #64823, even if you compare with the state before #59800.

@cup rust-nightly-x86_64-pc-windows-gnu.msi as of commit 000d90b11f7be70ffb7812680f7abc6deb52ec88 is now only 170M. So definitely a reduction here.

Closing as per investigation above.

@nagisa rust has still the largest package of the list in the original issue https://github.com/rust-lang/rust/issues/61978#issue-458281335 . The regression (that appeared after that original bug was filed) is fixed now, but it would still be cool to reduce the platform size even further.

E.g. #65251 will mean another improvement. In the 1.38 package, librustc_codegen_llvm-emscripten.so takes 36.7 MB uncompressed and (if my measurement method doesn't lie) 14 MB compressed.

I am going to close this as I feel it has been fixed in spirit. Current size is
162 MB which is a 20% reduction from the "round 1" issue size. If someone has a good case for why it should be reduced further they can open their own issue, thanks.

To give a table for the artifact size impact of #65251 and #65501:

| file name | 7e498005a12548a8fd396312affde05c4d3ca085 (prior to #65251 merge) | a16dca337de610986252bb800953e57bf395863f (after #65251 merge) | 6576f4be5af31a5e61dfc0cf50b7130e6c6dfb35 (prior to #65501 merge) | 50ffa79589600f515ff2710830c23cd2dce7cb76 (after #65501 merge) |
| - | - | - | - | - |
| rustc-nightly-x86_64-unknown-linux-gnu.tar.gz | 101217050 | 101236266 | 101985671 | 87758170 |
| rust-std-nightly-x86_64-unknown-linux-gnu.tar.gz | 215762860 | 215737742 | 222905600 | 222842202 |
| cargo-nightly-x86_64-unknown-linux-gnu.tar.gz | 6886595 | 6883817 | 6892313 | 6892440 |
| rustc-nightly-x86_64-pc-windows-msvc.tar.gz | 61249346 | 61241322 | 61724620 | 54205791 |
| rust-std-nightly-x86_64-pc-windows-msvc.tar.gz | 222779885 | 222664788 | 231804265 | 231808229 |
| cargo-nightly-x86_64-pc-windows-msvc.tar.gz | 4574938 | 4575259 | 4566405 | 4580389 |

So it seems that #65501 was the actual PR that removed the extra LLVM copy.

Edit: script used:

export TOOLS="rustc-nightly-x86_64-unknown-linux-gnu.tar.gz rust-std-nightly-x86_64-unknown-linux-gnu.tar.gz cargo-nightly-x86_64-unknown-linux-gnu.tar.gz rustc-nightly-x86_64-pc-windows-msvc.tar.gz rust-std-nightly-x86_64-pc-windows-msvc.tar.gz cargo-nightly-x86_64-pc-windows-msvc.tar.gz"

for TOOL in $TOOLS; do printf "| $TOOL |"; for COMMIT in 7e498005a12548a8fd396312affde05c4d3ca085 a16dca337de610986252bb800953e57bf395863f 6576f4be5af31a5e61dfc0cf50b7130e6c6dfb35 50ffa79589600f515ff2710830c23cd2dce7cb76; do curl -I -s https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rustc-builds/${COMMIT}/${TOOL} | rg Content-Length | tr -d '\r' | tr -d '\n' | sed 's/.*: //;s/\(.*\)/ \1 |/'; done; echo ; done
Was this page helpful?
0 / 5 - 0 ratings