1
votes

I've followed the instructions on this page to try to get the Racer package for Atom working in a 64-bit Windows OS. But I've so far been unsuccessful.

I installed Rust from this location. I installed Atom and its packages 'language-rust' (0.4.9) and 'racer' (0.20.0). I successfully compiled racer.exe using the source repository found here, producing a 3.4-MB binary. The Racer package asks for two directories to be specified by the user:

  1. Path to the Racer executable
  2. Path to the Rust source code directory

For the former, I pointed it at the location of the racer.exe binary I compiled. I'm not sure what to enter in the latter field.

If it's left blank, the plugin doesn't work (many errors are generated while typing). I gather that the Racer plugin wants to be pointed at a directory containing "the Rust source code", but I don't know what it's referring to. The package's documentation says, "The Rustc source has to point to the base directory of the source code.". The source points at the base directory of the source? I have no idea what that means, so I'm stuck.

1

1 Answers

3
votes

The "rust source code directory" refers to the source of the compiler and standard library, such that racer can look up definitions for types and functions defined in the standard library.

Using rustup, you can run the command rustup component add rust-src - which will download the source code to a folder like .multirust/toolchains/<your-toolchain>/lib/rustlib/src/rust/src

This is the path you want in step 2.

Alternatively, you can get it from here: https://github.com/rust-lang/rust/tree/stable