New Products

Official Support for Open-Source Rust Plugin for IntelliJ IDEA, CLion, and Other JetBrains IDEs

For those of you who follow the news in the Rust community, you may have noticed a teasing announce saying that the Rust plugin for the IntelliJ Platform is becoming officially supported by JetBrains. The announcement was followed by many questions about the plugin. With this post, we’d like to answer some of them and shed some light on what’s going on with the plugin and JetBrains plans.

It’s probably worth saying a few words on how the plugin started. On the first of September, 2015 two small groups of people at JetBrains simultaneously started working independently on the Rust support for IntelliJ-based IDEs. One of the projects was started by an Alexey Kladov, an intern at JetBrains. The other one was a side project by Alexey Kudinkin. Since the IntelliJ Platform is JVM-based, both plugins started as Kotlin projects, even before Kotlin was released. Since both groups were in touch with the Rust team, after a month, the groups realized about their mutual existence and merged their projects together. This is how the Rust IntelliJ plugin was born.

Making the project open-source really was the right decision since it attracted a lot of contributors, incl. Tobias Bieniek, Marek Kaput, Andrew Lygin, Arseniy Pendryak (among many others) which really helped make it better and shape the community around the plugin.

A year ago, the plugin was highlighted during RustConf’s keynote.

Current State

Since then we have put a lot of effort into making the developer experience even better. However, the plugin is still at a very early stage. Being an awesome language for developers, Rust is not always 100% IDE friendly, mainly due to its complicated type system, and the macros, etc.

  • Currently the plugin is quite helpful with Navigation: Go to Class, Go toSymbol, Go to Super Module, Structure, Go to Definition.
  • The editors offer Code Completion and Code Formatting (rustfmt is not used yet but it is planned), Join Lines, Smart Key (e.g. inserting pair brackets & quotes), Postfix Completion, basic Intentions and Refactorings (e.g. Introduce Variable, and an almost always-working Rename, etc).
  • The plugin supports Cargo: it offers a UI to run tests and applications. Adding this integration even required some work from Cargo’s side.

The main missing feature right now is Debugger. An experimental version of Debugger is now available in CLion but it’s currently very limited, mainly because CLion is heavily focused on CMake.

Our Plans

Our primary plans for the immediate future include:

    • Better consistency with the Rust’s type system
    • Macros
    • Debugger
    • More Intentions, Inspections, Refactorings

Q: Do you have a team working on the plugin?

The plugin’s team currently comprises of Alexey Kladov, who dedicates at least 40% of his time to Rust, and we’re adding another person to the team.

Q: Will there be a standalone Rust IDE from JetBrains

We do not have any specific plans for creating a standalone Rust IDE at this moment, but we have not ruled out the possibility of it in future. The plugin will remain open-source on GitHub. Pull requests, feature requests and bug reports are all welcome there.

If you’d like to try the Rust plugin for any IntelliJ-based IDEs (be it IntelliJ IDEA, CLion, WebStorm, Gogland, PyCharm or any other), make sure to read the docs.

Please feel free to voice your questions, suggestions and other feedback here in the comments. And of course issues and pull requests are always welcome in the intellij-rust Github project.

We appreciate your feedback and support!

UPDATE: Starting v2018.1 CLion now offers the Rust functionality via a plugin. The plugin supports Cargo and includes Debugger. Learn more.

JetBrains
The Drive to Develop

image description