How to use rust-analyzer offline

I use VSCode offline, install rust-analyzer extension, but it don't work!

What does 'offline' mean here? Does vscode + rust-analyzer work when you are 'online' ?

Do you have the rust-src rustup component installed? Rust-analyzer needs this for the standard library sources. And does cargo check --workspace work?

1 Like

I use vscode offline,so there isn't rustup. I must download all of setup package. Thanks!

You can download components without rustup too.I believe the full installation bundle contains the rust-src component already (you probably do need to explicitly select it for installation), but otherwise you can find the bundle in the same directory as wherever you got the installation bundle.

I download setup package from other installation methods, how can I select it?

Did you download rust-1.74.1-x86_64-pc-windows-msvc.msi? If so I think you have to press the advanced button and then after a couple of next you should get a list of available compontents where you have to add rust-src. (wine hangs when I try to run the msi on my linux system)

1 Like

Thanks!I try it.

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.