Toolchain overrides are not being considered on Apple Silicon

Hello there,

I have the following content in my rust-toolchain.toml:

[toolchain]
channel = "nightly"

When I run rustup toolchain list I would expect to see the override for the nightly toolchain.

Instead I see:

stable-aarch64-apple-darwin (default)
nightly-aarch64-apple-darwin

The funny thing is that if I run cargo run it will download the nightly for x86_64-apple-darwin. Why is this happening? Is it a bug?

Did you run list again after it downloaded the toolchain? It shows up then for me.

It doesn't seem ideal that list doesn't show anything when the toolchain isn't installed, but I'm not sure it should actually do the install.

Well, it should not install it. It should rather select my aarch64 nightly instead :wink:

If cargo run downloaded a new toolchain, it means there wasn't a nightly toolchain installed already[1]. At least in my test, rustup toolchain list did indeed show the override after the install occured


  1. or maybe there was a newer nightly? â†Šī¸Ž

The problem is that the nightly toolchain for aarch64 is installed but the override thinks this is an x86_64 host, which is not as this is an Apple Silicon box.

Oh I totally skipped over the x86 part, sorry! My machine downloaded the aarch64 nightly toolchain.

What version of rustup do you have?

I am on rustup 1.25.2 (fae52a197 2023-02-01)

What is the content of ~/.rustup/settings.toml?

@bjorn3 thanks for pointing that out!

Here is the content:

default_host_triple = "x86_64-apple-darwin"
default_toolchain = "stable-aarch64-apple-darwin"
profile = "default"
version = "12"

[overrides]
"/Users/tanis/Documents/cargo-binocle" = "nightly-x86_64-apple-darwin"
"/Users/tanis/Documents/test-rust-func" = "nightly-x86_64-apple-darwin"

And obviously line 1 is wrong. I believe that's because I migrated from an Intel-based MacBookPro to the M2 Max one and that line must have been there since forever.

I just run the following to set it up correctly:
rustup set default-host aarch64-apple-darwin

And now it is working as expected :wink: Thanks a lot to all of you!

2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.