How to run Rust on visual studio? I have some problem, actually i get error when start compiling. On official site i saw “If you don’t, that probably means that the PATH environment variable doesn’t include Cargo’s binary directory” i think this is my problem. One man advice me “to copy the path where the cargo.exe is, add that to your PATH variable and log out and in again”, but i dont understand, where is cargo.exe must be and where i must drop it. Please help and sory for English, just no many info on Russian-language sources.
I installed Rust using rustup on Windows and it put all the binaries on
c:\Users\<myuser>\.cargo\bin so you should look in that path. You will need to add this path the PATH environment variable (the procedure will depend on your Windows version).
I’m not using Visual Studio, I’m using Visual Studio Code (maybe you are talking about the same program), and I installed the Rust extension.
When the extension is run it will request to install some additional software, in my case the extension failed because it was trying to run:
cargo install racer && cargo install rustfmt && cargo install rustsym
But the Windows console complains about the
&&, just run every command separated and everything should work
I hope this can help.
(Don’t be sorry about your english, you are speaking another language! )