rust-lang / rustlings

:crab: Small exercises to get you used to reading and writing Rust code!
https://rustlings.cool
MIT License
52.82k stars 10.03k forks source link

`no sysroot` error using rust-analyzer with vscode #1996

Closed ryan-kipawa closed 3 months ago

ryan-kipawa commented 3 months ago

Hi,

I've been trying to use rustlings on my macbook together with vscode and the rust-analyzer extension. I can install and run rustlings no problem, however, the rust-analyzer extension gives the following error message:

Failed spawning proc-macro server for workspace `/Users/ryan/rustlings/rust-project.json`: no sysroot

I already ran rustlings lsp per the installation instructions. I've also tried several things suggested on stack overflow and other places but without luck. Here's a few specs:

OS: macOS Monterey 12.7.4 rustlings: 5.6.1 rust-analyzer (vs code extension): v0.3.2002 vs-code: 1.90.1

Thanks for your help :)

mo8it commented 3 months ago

Duplicate of https://github.com/rust-lang/rustlings/issues/1981

I will try to hurry up with releasing version 6 which will fix this problem. Until then, you could manually add sysroot to project.json as described in https://github.com/rust-lang/rustlings/issues/1981.