rust-lang/rust

.tar.gz dist files require running `install.sh` before they can be used

Opened this issue · 2 comments

If I download Rust using:

x86_64-pc-windows-gnu.tar.gz

from here:

https://forge.rust-lang.org/other-installation-methods#standalone-installers

it seems the compiler cant actually compile anything:

$ cat aaaaa.rs
fn main() {
   println!("bbbbb ccccc");
}

$ rustc aaaaa.rs
error[E0463]: can't find crate for `std`

I have solved this. Obviously the MSI files here:

https://forge.rust-lang.org/other-installation-methods#standalone-installers

are installers. However the TAR.GZ files are also installers. So to work with
the TAR.GZ, you need to do this:

./install.sh --verbose --prefix=/tmp \
--components=rustc,rust-mingw,rust-std-x86_64-pc-windows-gnu

or alternatively this:

cp -r -s "$PWD"/rust-std-x86_64-pc-windows-gnu/lib rustc
cp -r -s "$PWD"/rust-mingw/lib rustc

I disagree with the decision to make the TAR.GZ archives require installation:
the whole point distributing an archive over an installer is so that users can
extract and go.

Not MinGW specific.

@rustbot modify labels: -O-windows-gnu