What's the path for the Rust standard library location for CLion on Windows?
Asked Answered
E

3

6

I am getting started with Rust and I am using the Rust plugin for Clion. When I create a new Rust project, I need to specify the location of the stdlib. For whatever reason, it's not auto populating with the correct path. When I click Download via rustup nothing happens.

What's the path for the Rust standard library?

enter image description here

Endymion answered 8/8, 2018 at 17:30 Comment(3)
Did you install rustup ?Ioab
I did but I reinstalled clion and the issue seemed to go away.Endymion
Yes, you need to install rustp before CLion installation.Ceiba
E
3

I use wsl with Windows and the path to the standard Rust libraries is this:

\\wsl$\kali-linux\home\myUserName\.rustup\toolchains\stable-x86_64-unknown-linux-gnu\lib\rustlib\src\rust

Only to get this I searched because right after installation it didn't work either.

I had to delete all my toolchains directory from wsl with

rm -frv ~/.rustup/toolchains/* directory 

and then install it again by doing

rustup update 

and

rustup -v component add rust-src

otherwise I didn't have the standard Rust libraries in my installation and I got a

/lib/rustlib/src': No such file or directory 

error

when testing

ls ~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src
Ediva answered 17/12, 2022 at 21:14 Comment(0)
E
1

For those who are having challenges, this is the location on Windows (assuming stable/x64):

C:\Users\<user>\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src
Equipoise answered 22/10, 2021 at 18:24 Comment(0)
C
-1

Put standard library path as "c:\Users\andrew\.cargo\registry".

Ceiba answered 7/6, 2020 at 7:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.