What’s new in IntelliJ Rust

IntelliJ Rust is an open-source Rust plugin for IntelliJ-based IDEs that strives to provide a full IDE experience:

Useful links:

New versions are released every two weeks and three times a year a unified overview post is released. I'll start the thread with recent updates but you can find older stuff here.

4 Likes

What’s new in the IntelliJ Rust plugin for 2022.1

  • Faster macro expansion
  • Name resolution improvements
  • The Extract trait refactoring
  • Initial support for Run targets
  • and more:
2 Likes

IntelliJ Rust Changelog #171

This regular update improves type inference, including unsized coercion, and provides builds for the upcoming 2022.2 releases of JetBrains IDEs:

1 Like

IntelliJ Rust Changelog #172

This release contains fixes for long-standing issues related to terminal emulation in Cargo commands output. Also, now the plugin provides web references in string literals.

IntelliJ Rust Changelog #173

  • The plugin now considers the recursion limit that controls the macro expansion depth.
  • The Old Macro Expansion Engine option was removed.
  • Improved clippy lint completion.
  • Reduced memory usage by trait implementation metadata.
1 Like

Procedural Macros Under the Hood: Part 2

The second part of the "Procedural macros under the hood" blog series invites you to take a closer look at how the compiler and the IDE process them:

3 Likes

IntelliJ Rust Changelog #174

Highlights:

  • The rename refactoring is now supported for macro metavariables.
  • Better detection of move errors when a type overloads dereference operator.
  • Significant performance improvements.
1 Like

IntelliJ Rust Changelog #175

Highlights:

  • The plugin can now convert JSON to Rust structs after paste.
  • New approach to detecting changes in configuration files and a new way to reload project models.
  • Highlight macro-machinery-specific syntax in declarative macro definitions.
  • A couple of Cargo.toml inspections are enabled by default now.
  • Performance improvements and better built-in detection of import-related errors.
1 Like

IntelliJ Rust Updates Summary For the 2022.2 Release Cycle

  • You can now convert JSON to Rust types via copy-paste
  • Improved the project model reloading
  • Macro-related improvements
  • More compiler and Cargo.toml errors are detected
  • Significant performance improvements
  • and more:

/r/rust discussion:

1 Like

IntelliJ Rust Changelog #176

Highlights:

  • Improved "Inline function" refactoring: new names for bindings to avoid shadowing, simple arguments inlining, better handling of nested calls, and destructuring assignments.
  • Performance improvements and lots of bug fixes.

https://intellij-rust.github.io/2022/08/15/changelog-176

/r/rust discussion

1 Like

IntelliJ Rust Changelog #177

Highlights:

  • The rename refactoring of items expanded from a macro is now supported.
  • The proc macro server for new rustup toolchains is automatically detected and used by the plugin.
  • Debugger pretty-printers improvements.
  • Improvements of top-level completion of macro calls.

https://intellij-rust.github.io/2022/08/29/changelog-177

/r/rust discussion

IntelliJ Rust Changelog #178

Highlights:

  • Dependencies not suitable for the current platform are no longer downloaded and analyzed.
  • Completion for attribute proc-macros in attributes.
  • Debugger pretty-printers for range types.
  • Another bunch of performance improvements and bugfixes.

https://intellij-rust.github.io/2022/09/12/changelog-178

/r/rust discussion

IntelliJ Rust Changelog #179

Highlights:

  • Improved folded blocks rendering.
  • Build scripts evaluation now uses the –keep-going Cargo option to build/execute as much as possible even if some build scripts or proc-macros are broken.
  • redundant_semicolons inspection and fix.
  • More function attribute completions
  • Another bunch of significant performance Improvements for name resolution and type inference.

https://intellij-rust.github.io/2022/09/26/changelog-179

/r/rust discussion

Apologies if this is off topic. Is there a way in IntelliJ rust to have a comment which embeds either:

  1. a filename or
  2. a module / crate (that is not a dependency but is part of workspace)

and to place the cursor over the label and do a "jump to destination" ?

I'm afraid that I don't know of any universal mechanism to link files in comments. The closest thing that comes to my mind is rustdoc's intra links, though it's not properly supported by IntelliJ-Rust yet - here's the tracking issue:

2 Likes

IntelliJ Rust Changelog #180

Highlights:

  • Complete custom derive proc-macros and automatically add imports for out-of-scope ones.
  • Automatically import unresolved items after pasting Rust code into the editor.
  • 2022.3 EAPs platforms are now supported while 2022.1 are dropped.

https://intellij-rust.github.io/2022/10/10/changelog-180

/r/rust discussion

1 Like

As a Pycharm professional customer, I'm super excited that the Rust plugin works in Pycharm, thank you!!

1 Like

Evaluating Build Scripts In IntelliJ-Rust

Vitaly Bragilevsky wrote a blog post about the newly stabilized support for build script evaluation in IntelliJ Rust: what are build scripts, why are they important for IDEs, a high-level overview of the new feature's implementation, and some usage examples:

3 Likes

IntelliJ Rust Changelog #181

Highlights:

  • Build scripts evaluation is now enabled by default.
  • New syntax for Cargo features is now supported.
  • The “Inline type alias” refactoring is now available.

https://intellij-rust.github.io/2022/10/24/changelog-181

/r/rust discussion

IntelliJ Rust Changelog #182

Highlights:

  • let_chains support.
  • Functionality for running documentation tests is now the same as for usual tests.
  • Decorate MSVC type names when rendering values in the debugger on Windows.
  • A quick-fix to generate missing trait member definitions in trait implementations.

https://plugins.jetbrains.com/plugin/8182-rust/what-s-new/changelog-182

/r/rust discussion