Subject: bug#59214: [PATCH] Alternate rust-analyzer command added

From: "M. Ian Graham" <[email-masked]>
Date: Thu, 17 Nov 2022 09:01:50 +0000

João Távora <[email-masked]> wrote:

> So rustup is just an optional way of installing rust-analyzer?

Rustup is not required, only recommended for new developers.

See Rust's installation guide, which also describes how to add components to PATH when using rustup:
https://www.rust-lang.org/tools/install

See also the next page's description of other installation methods for people who have "Preference for the system package manager" or "Preference against curl | sh" (!):
https://forge.rust-lang.org/infra/other-installation-methods.html

> If I wanted to learn Rust, just Rust, should I start with a rustup-less setup?

The docs above do a good job of breaking down reasons for different installation methods. I'd take their word over mine, but IMO the biggest factor is whether you prefer learning bottom-up and adding complexity as you go, or top-down and having unfamiliar pieces managed for you. Rustup is a top-down, "just works" sort of tool.

If you're an emacs user comfortable with other CLI compilers, you'd be absolutely fine starting with your preferred package manager's "install rust" command and working from there for the bottom-up approach, assuming your distro packages the standard installer. Using this gives you rustc+cargo, which is the equivalent of node+npm, go+subcommands, etc. If that's not available, rustup is fine too!

Cheers,
Ian