Automated install of Rust toolchain


#1

Hi,

In our dev environment the user will run a script (.sh on macOS, cmd on Windows) that currently sets up some paths, variables, etc for the environment to use.

I would like during this phase check if Rust toolchain (stable) is installed or and install it. Using rustup for this would be great of course but I wonder if anyone has done something similar and it needs to work on both macOS and Windows (even if the implementation may be slightly different I would prefer to be as similar as possible)

Cheers!


#2

You mean like, rustup override set stable?


#3

It’s a bit more to it than than that. How do I get rustup installed in the first place in such a way that it works on both macOS and Windows (in an automated way that doesn’t require user interaction) on mac you can use the sh script but on windows you may need an executable?


#4

Why exactly do you need the process to be exactly the same?


Edit: I might have misinterpreted you, still recovering from this flu, so my brain isn’t quite working. There is an exe for installing rustup on Windows as well. See this link