Adds language support for Rust to Visual Studio 2017. Supports:
- code completion
- goto definition
- find all references
- error squiggles
Rust support is powered by the Rust Language Server (RLS). Language server support was recently added experimentally to Visual Studio, and is only available on preview builds of VS.
Please note that this extension is very early in development. At this time setup is more complicated than similar extensions for Visual Studio Code. This will be fixed in future versions.
- Install a preview build of Visual Studio
- Install the preview LSP support from the marketplace
- Install rustup (Rust toolchain manager).
- Install this extension from the marketplace
- Go to the options for the extension (
Tools > Options > Rust
) and set the toolchain to the one you installed the components to. - Open a Rust project (
File > Open Folder...
). Open the folder for the whole project (i.e., the folder containing 'Cargo.toml'), not the 'src' folder. - The extension will start when you open a Rust file. You'll be prompted to install the RLS. Once installed, the RLS should start building your project.