Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to provide standard library sources for IntelliJ IDEA's Rust project?

I am using Mac for development. I installed Rust 1.13.0 using brew install rust and the Rust plugin 0.1.0.1385 for IntelliJ IDEA. I created my first test project with cargo and while opening it with IDEA I got the message

No standard library sources found, some code insight will not work

I haven't found any sources installed, nor the Rust sources package in Homebrew.

How do I provide sources for the project and what are the practical implication if I ignore this step?

like image 389
wst Avatar asked Jan 04 '17 12:01

wst


1 Answers

As commented, the supported approach is to use rustup:

  • Navigate to https://rustup.rs/ and follow the installation instructions for your platform.
  • Add the rust-src component by running: rustup component add rust-src
  • Create a new Rust project in IntelliJ and choose your existing Rust project source. If the folder already contains previous IntelliJ project files, you may have to delete those first before it will let you proceed.
  • IntelliJ-Rust should automatically configure the standard library sources to point to the sources downloaded by rustup.
like image 92
w.brian Avatar answered Oct 03 '22 17:10

w.brian