I don't know your exact requirements but rustup-init
accepts a -y
flag that makes installation non-interactive.
You also need to be concerned with rustup self-updates. Presumably if you are installing through homebrew you want homebrew to do the updates, not rustup. For this I'd like to be able to build rustup with a compile-time option to disable self-updates.
I'd like to know more about what you want out of the --prefix
option. Part of rustup's design is to install bins to ~/.cargo
, making all Rust bins live in the Cargo world. What would be the effect of --prefix
? Putting rustup
in a different directory? Putting rustup
and the command proxies (rustc
, cargo
, etc) in a different directory?