You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A comment in issue #99 raised the question of automatically downloading a Rust toolchain if the required toolchain and components are not found on the host system.
A first exploration suggests this would be reasonably easy by using rustup and $RUSTUP_HOME / $CARGO_HOME. Goa should check if a matching toolchain is already installed on the host system by parsing rustup toolchain list and if it features the rust-src component by calling rustup compoent list +nightly-toolchain-name. Depending on the outcome, calls subsequent calls to cargo should add a +nightly-toolchain-name as a first argument, so that e.g. a nightly toolchain is selected even if the default toolchain is set to stable. If no suitable toolchain is found, goa should install the necessary components into a local $RUSTUP_HOME and export the environment variable on subsequent calls to cargo.
Alternatives exist e.g. by using toolchain files or directory overrides, but the former requires an extra file to be generated in the Rust source directory while the later would intransparently alter system-wide configuration.
The text was updated successfully, but these errors were encountered:
A comment in issue #99 raised the question of automatically downloading a Rust toolchain if the required toolchain and components are not found on the host system.
A first exploration suggests this would be reasonably easy by using
rustup
and$RUSTUP_HOME
/$CARGO_HOME
. Goa should check if a matching toolchain is already installed on the host system by parsingrustup toolchain list
and if it features therust-src
component by callingrustup compoent list +nightly-toolchain-name
. Depending on the outcome, calls subsequent calls tocargo
should add a+nightly-toolchain-name
as a first argument, so that e.g. a nightly toolchain is selected even if the default toolchain is set to stable. If no suitable toolchain is found, goa should install the necessary components into a local$RUSTUP_HOME
and export the environment variable on subsequent calls tocargo
.Alternatives exist e.g. by using toolchain files or directory overrides, but the former requires an extra file to be generated in the Rust source directory while the later would intransparently alter system-wide configuration.
The text was updated successfully, but these errors were encountered: