Rustup: Command-line-friendly way to rustup on windows

Created on 2 Jun 2018  路  4Comments  路  Source: rust-lang/rustup

Projects that are building on windows in CI need a one-liner to install and run the rustup.
The same way it works on unix and mac.
Example of a script that people use at the moment in CI https://github.com/rust-onig/rust-onig/blob/68393b487c679c789ee8a762e77f568e75a3128a/appveyor_rust_install.ps1

This script is not a very good because it uses appveyor-specific calls.
A better one may look something like

$client = new-object System.Net.WebClient
$client.DownloadFile('https://win.rustup.rs', "$pwd\rustup-init.exe")
.\rustup-init.exe

This is a powershell script, powershell ships inbox on all windows machines.
Bells and whisles to pass channels and other parameters could be added.

By hosting it on the ps1.rustup.rs, there would be a simple copy-pastable one-liner, like in choco https://chocolatey.org/install

It can be then put on https://rustup.rs/ under windows tab.

O-windows

Most helpful comment

Not only for automated systems.
Here I'm running windows containers on mac, and all I have is a command line. So the "download this installer" is pretty cumbersome way to go. This is just how I'm able to build on both mac and windows locally and rsync things.

image

All 4 comments

Related #912

Seems like a good idea, although would only really be an improvement for automated systems, so the executable should still be the primary install method.

It might make more sense to save to a temporary directory, or the downloads directory instead of the current directory, and to include -y and the toolchain selector.

@rust-lang-nursery/rustup-rs-owners thoughts?

Not only for automated systems.
Here I'm running windows containers on mac, and all I have is a command line. So the "download this installer" is pretty cumbersome way to go. This is just how I'm able to build on both mac and windows locally and rsync things.

image

@rustbot label: +O-windows

Was this page helpful?
0 / 5 - 0 ratings

Related issues

QuarkDoe picture QuarkDoe  路  4Comments

lilred picture lilred  路  3Comments

matthiaskrgr picture matthiaskrgr  路  3Comments

durka picture durka  路  3Comments

fenhl picture fenhl  路  4Comments