-msvc distribution has unused import libraries
Currently in the binary distributions for the -msvc packages, the bin folder has import libraries (.dll.lib) for all the DLLs there even though they are never linked to and could be removed to save some space.
There are 9.53MB of
.dll.libfiles in thebinfolder forx86_64-pc-windows-msvc, so some real savings could be had here.Peter Atashian at 2016-08-29 10:44:14
Triage: i don't believe we've made any changes here
Steve Klabnik at 2019-12-25 17:07:56
This is "solved" in the sense that the
binfolder no longer has any.dll.libfiles. And the default install (via rustup) only has anstd.dll.libin thelibdirectory (which I believe is necessary for dynamic linking std).The
rustc-devcomponent has more in thelibdirectory. Which isn't installed by rustup by default but is often wanted for the sake of rust-analyzer:> fd --glob *.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\displaydoc-50af9f3b461c50d7.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\derive_where-206786c695a9dc16.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\derive_setters-a2f1ec4ed87dfbc7.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\darling_macro-f87e03ec2d819174.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\icu_provider_macros-e131c148f308f71a.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\zerovec_derive-695483c3dcc03934.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\zerofrom_derive-e1e48a815bb69c9b.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\zerocopy_derive-27714ff9c04ef83d.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\yoke_derive-39051f0a587115c1.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\windows_interface-347768d48a11878b.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\windows_implement-097e354d91641b9d.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\unic_langid_macros_impl-894edf185f03f9d0.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\tracing_attributes-d58a2c7882daed23.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\time_macros-20cac86208b0bcab.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\thiserror_impl-f440f8b09529953d.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\std-d2406463b94cbd40.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\serde_derive-eb51b2ffc4fba3a5.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\rustc_type_ir_macros-4dfe615a35adf301.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\rustc_macros-590be8bdb48ccbc3.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\rustc_index_macros-cc64c85948f697cc.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\rustc_fluent_macro-b345195c88567b14.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\rustc_driver-c6b42fc3dcb03cd3.dll.lib lib\rustlib\x86_64-pc-windows-msvc\lib\proc_macro_hack-5788a2919223a19c.dll.libI'm guessing
rustc_driveris, likestd, necessary because it can be used by other tools. I'm not sure about the others. They look more internal.Chris Denton at 2024-10-03 11:30:17