Installing Rust[edit | edit source]
The recommended method for installing Rust is via rustup, a command-line tool for installing the Rust toolchain and keeping it up to date. It also allows adding useful components and targets for cross-compilation.
Language servers[edit | edit source]
Language servers provide code completion, detect errors prior to compilation, and do many other useful things. By using the Language Server Protocol, they are compatible with a wide range of IDEs and editors. The following popular language servers exist for Rust:
|RLS||Official language server for Rust.
|VS Code: Install the Rust extension|
|rust-analyzer||Newer language server that will eventually replace RLS.
It uses the
|VS Code: Install the rust-analyzer extension|
More installation options
On the fly checking using both RLS and rust-analyzer[edit | edit source]
Currently, rust-analyzer (RA) doesn't support on the fly checking, but it's possible to install both RLS and RA, using the former for on-the-fly checking and the latter for everything else. Since both provide autocompletion, remember to disable racer for RLS in order to prevent any conflicts.
Note that this is a temporary solution and not recommended, although there is no harm in trying it if you need both RA and live diagnostics, and don't mind the increased memory usage.
IDE plugins not based on a language server[edit | edit source]
|IntelliJ Rust||JetBrains IDEs
(IntelliJ, CLion, PyCharm, ...)
|It provides similar features to RLS and rust-analyzer for JetBrains IDEs.|
Note that Debugging is currently only supported in CLion and IntelliJ IDEA Ultimate.
Rust Integration with IDEs[edit | edit source]
Neovim[edit | edit source]
A full article on how to setup neovim for rust can be found here: https://sharksforarms.dev/posts/neovim-rust/