rustup
rustup copied to clipboard
Is the rust-analyzer proxy supposed to be installed on tier-2 and lower platforms?
Problem
On platforms like aarch64-apple-darwin or x86_64-unknown-freebsd, when I install Rust via rustup, and then install the rust-analyzer component, rust-analyzer isn't installed (no binary, no proxy). It seems to only install on tier 1 platforms (I'm afraid I can only test on x86_64-unknown-linux-gnu). Is this deliberate?
Steps
- Install Rust via rustup on a tier 2 platform
- Install the rust-analyzer component
- Try to run rust-analyzer
Possible Solution(s)
No response
Notes
No response
Rustup version
rustup 1.25.2 (17db695f1 2023-02-01)
Installed toolchains
Default host: aarch64-apple-darwin
rustup home: /Users/luna/.rustup
installed toolchains
--------------------
stable-aarch64-apple-darwin (default)
nightly-aarch64-apple-darwin
active toolchain
----------------
stable-aarch64-apple-darwin (default)
rustc 1.68.2 (9eb3afe9e 2023-03-27)
There currently isn't a proxy available for rust-analyzer. To find the path to rust-analyzer, you have to run rustup which rust-analyzer. If you are using the vscode extension, it figures that out for you.
The proxy should be available in the next release of rustup which is currently in the process of testing. If you want to help test it out, the instructions are at https://internals.rust-lang.org/t/help-verify-rustup-1-26-0-release/18577.
Okay, maybe I'm misunderstanding. On my Linux machine I can do rustup component add rust-analyzer and it installs a symlink to a useable binary in ~/.cargo/bin. The symlink points to the binary at the path returned by rustup which rust-analyzer. But when I do this on the platforms I've mentioned above, the symlink isn't present. The binary at rustup which rust-analyzer is present, but the symlink isn't.
Is the symlink not the function of the proxy?
Rustup 1.25.2 doesn't install a proxy for rust-analyzer in ~/.cargo/bin. Rustup usually creates hard links from ~/.cargo/bin/rustup to the other binaries (~/.cargo/bin/rustc, etc.). Rustup uses the name of the process ("arg0") to determine which command is being requested. It may use symlinks in some very rare cases, but those should point to ~/.cargo/bin/rustup. I suspect you have something else creating that symlink.
This seems to still be happening on 1.26.0 and it produces issues difficult to diagnose for the user: I symlinked the binary from .rustup into .cargo/bin and this somehow resulted in rustup working but not being updated, without any error message suggesting something was wrong.