New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cargo project update failed: no explicit stdlib or rustup found #2267
Comments
|
Is it possible, that what IntelliJ Rust actually wants, is the path to the Rust source code containing a "libstd" directory? In which case it might get a little bit more automatism by looking at src/Cargo.toml and seeing that this is a copy of the Rust source code, and ask me whether I want to use that one. |
|
I'd like to assign this to myself, if possible, and see whether I can come up with some wording that's more detailed and easier to understand. |
The original intention was to improve error message, which was confusing some users. Since the source code itself was also referring to the Rust source as "stdlib" or "standard library", I fixed that as well. Fixes: intellij-rust#2267 Signed-off-by: Dennis Schridde <devurandom@gmx.net>
|
Please note that #2275 does NOT yet detect that the currently open project is a copy of the Rust source code and hence it does not yet offer the user to just use this source. |
|
I have also tried to solve this by providing the path "/usr/lib/rustlib/src/rust/src/libstd" but it is not being accepted :( Edit: Go with |
|
The problem still exists in the latest IJ (Build #IU-182.3911.13), Rust plugin Version: 0.2.0.2101-182. In my case the problem seemed to be with rust installed via brew. After |
|
Faced the same problem, that's because I was following setup instructions from TheBook. To prove it won't work type So to avoid that in IDEA you should uninstall Rust first:
Now it works. |
The original intention was to improve error message, which was confusing some users. Since the source code itself was also referring to the Rust source as "stdlib" or "standard library", I fixed that as well. Fixes: intellij-rust#2267 Signed-off-by: Dennis Schridde <devurandom@gmx.net>
The original intention was to improve error message, which was confusing some users. Since the source code itself was also referring to the Rust source as "stdlib" or "standard library", I fixed that as well. Fixes: intellij-rust#2267 Signed-off-by: Dennis Schridde <devurandom@gmx.net>
|
I can confirm this issue, create a new project from Rust application binary template and receive |
|
On macOS had the same issue, with both InelliJ and CLion, and like @dkandalov I had Rust initially installed with Homebrew. With CLion I was able to build (IntelliJ kept complaining about missing SDK), but the error message was annoying. It looks like Homebrew does not install the sources, if I understand the problem correctly. To get rid of it, I first uninstalled Rust:
After that, in the welcome dialogue I've let CLion retrieve the standard library: The library is then in |
|
I was in the process of filling out an addition to this thread as I thought I had this problem, but I found a related issue. I hadn't personally gone into the global settings or project settings and set the Rust toolchain preferences as they were being autofilled at project creation time. However, I was still getting the issue reported above. While in the project (and global) settings, if I navigated to the Rust settings, the settable fields would be empty then autofill with the Apply button ready to be pressed. Once doing so the plugin works fine. It seems the settings (though showing correctly initially) actually weren't being set in the background. CLion: 2019.3.4 |
|
rustup did not successfully install and configure the stable toolchain, you can do it manually(in $home/.cargo/bin): |
This helped me. As an Arch user, I ran these commands to essentially reinstall Rust the way PyCharm wanted me to (I guess?):
|
|
on MacOS, adding the rust path in global PATH worked for me |
Worked for me. Thanks! |
|
as a linux user, i solved this problem by uninstall rust and install rustup using and restarting the ide should finish the work |
|
I think I know how to fix this issue for Windows 10 +. |



When working on the Rust source code itself, IntelliJ Rust complains "Cargo project update failed: no explicit stdlib or rustup found". I am not sure what this means, exactly.
Further, IntelliJ Rust says at the top of any file that it "Can not attach stdlib sources automatically without rustup", but when I try to "Attach manually", it tells me that "Invalid Rust standard library source path: <.../rust/src/libstd>", where rust/src/libstd is the path to the source code of libstd. What exactly is IntelliJ Rust search for, when it asks for the location of that library source code?
It appears that these error message could be enriched to make it easier for the user to solve the issue. I would be glad to contribute such a patch, but am unable to do so without additional help and information.
The text was updated successfully, but these errors were encountered: