rust - Initial setup with Visual Studio Code

Jan 5, 2018

What I had to do to get rust working in VS Code (not much!).

Install rust

Official guide

curl https://sh.rustup.rs -sSf sh

Install the nightly toolchain

rustup toolchain install nightly

Install VS Code extension

Install the rust extension for VS Code, this does not seem to work properly until nightly has been installed.

https://marketplace.visualstudio.com/items?itemName=rust-lang.rust

Create sample project

1 cargo new vscode_hello --bin
2 cd vscode_hello
3 code .

Others

Switch the default toolchain

rustup default nightly

Done.