IDE support for Rust is an oft-requested feature and a key goal of this years roadmap. For the past year we’ve been working on an editor-agnostic IDE backend called the Rust Language Server (RLS). The currently recommended way to use the RLS is in Visual Studio Code and an extension to do so is now in the VSCode marketplace. Both the RLS and our extension are ‘preview’ quality. We’d love for you to try them out and share your experience, especially if you find bugs. However, you should expect that the experience will not be perfect (yet).
To try this out you’ll need VSCode and Rustup installed on your system. You can install the extension in VSCode by running
ext install rust from the command palette (ctrl+P). Open a folder containing a Rust project (i.e., the folder containing
Cargo.toml), then open a Rust file; the extension will startup automatically. On first run, the extension will install the RLS and a nightly toolchain if neccessary. It will then index your project, which can take a while. For more info on installation see the extension in the marketplace.
The RLS can highlight errors (and sometimes apply suggestions for fixing them), jump to definitions, show you the types of expressions, offer code completion, and more. For a more complete guide (with pictures!), see my recent blog post - what the RLS can do.
The current releases of the RLS and VSCode extension are preview releases. We think they work pretty well, but they’re not 1.0 quality - it only works with nightly Rust, and only works on straightforward projects (it can’t cope with Cargo workspaces, for example). There are also bugs, of course. Because we rely on the compiler, indexing can be a bit slow, so the RLS works best with small to medium sized crates.
We hope the RLS will be available on all channels with Rust version 21, i.e., the RLS preview will work with stable Rust from October 13th. We estimate that the RLS and VSCode extension will be ready for a 1.0 announcement at the end of the year (and will work with stable Rust 2 cycles, apx 12 weeks, later).
So, if you want to use Rust with an IDE, give it a go! Let us know how it goes in #rust-dev-tools, by commenting here, or filing an issue.