Skip to content

Make Rustup install a non-emulated toolchain in an emulated environment #3514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rami3l opened this issue Oct 22, 2023 · 0 comments
Open
Milestone

Comments

@rami3l
Copy link
Member

rami3l commented Oct 22, 2023

As a continuation of #3068:

Is it possible to teach 'rustup self update' to install the correct non-emulated binary (even if there isn't a new rustup version to update to)?

I think we'd also need to change the default target in the rustup config, since that will be intel rather than aarch64 too.

I'm not sure UX wise whether doing it silently is sensible. I worry about IDE integrations.

What about this as a proposal:

  1. we add some docs about this
  2. add a config option to disable emulation detection (default is enabled)
  3. if emulation detection is enabled:
    a) all proxies stop working and output an error directing folk to our docs
    b) rustup self update with no options is unchanged
    c) rustup self update --to-native, a new option to self update, will:
    1. if the default host triple matches the emulation, rewrite it to be the native triple
    2. if the default toolchain, and any override toolchains, specify the emulated triple, rewrite them to match the native triple
    3. download the native rustup-init and install it into place

I'm not suggesting deleting toolchains because that gets into rapidly mounting complexity: cross.rs for instance wants lots of non-native toolchains present, linked toolchains can be wrong too and we don't have their arch etc.

Changing the defaults and overrides will cause implicit installation of the rewritten toolchain specifications automatically at next use.

Originally posted by @rbtcollins in #3068 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant