IntelliJ Rust
jetbrains.comIs there something new here, or is this just a link to the existing Rust plugin, such as I've already been using from CLion for a couple years?
(When I first saw the link I was wondering if JetBrains had decided to release a Rust-centric IDE, and was briefly excited (tho I have a CLion license) but seems that's not the case.)
FWIW latest changelog on the plugin @ https://intellij-rust.github.io/2023/07/10/changelog-198.htm...
Both IntelliJ Rust and Rust Analyzer (an LSP server for Vim, VSCode, and other editors) teams publish their changelings weekly on Monday. Often the two blog posts get linked on /r/rust right next to each other. It's always heartwarming seeing users of both coming over to these threads and thanking the maintainers.
The plugin is better than nothing but not really up to par with Jetbrains standards yet.
- More than half of compile time errors are not shown in the IDEs. - Breaks when using some macros. For example wheb using gtk-rs each file defining a custom widget constantly show 2 errors that aren't there. Autocompletion fails for a lot of macros, even simple ones with macro_rules!. - The debugger works but there are no type renderers. I wish it showed the result of Display or Debug. Often you have to go through 5-6 layers of objects to find the actual data with std types. Single stepping can be very slow at times. Runtime expression evaluation almost always fails except for very simple expression like accessing a field (forget about anything that creates structs). - Finding files with double Shift is usually very fast but for some reason it can take 6-7 seconds for Rust files to show up.
Set it to Clippy and real-time lint instead of cargo check
Ah thanks it works better. The false positive errors are still there and it takes like 15 sec before errors show up though. I guess it's better still.
Last time I tried this, the plugin was incapable of actually showing compile errors in the project view and they said their false positive error rate was too high to enable it (https://github.com/intellij-rust/intellij-rust/pull/8373). That was a dealbreaker for me compared to VSCode. It doesn't look like that's changed?
Using it everyday and I can’t confirm this at all.
Worst case you can enable clippy to run in the background.
I suspect they did eventually enable it by default to match expectations. I generally see a rate of actually showing compilation errors of around 70%? Perhaps higher, it's not the 100% of other languages like Java/Go, and anecdotally I feel a higher rate with JS.
> Last time I tried this
When was that?
(2020)
From the page source: "datePublished": "2020-08-28T09:00",
Latest from July 10th, changelog:
https://intellij-rust.github.io/2023/07/10/changelog-198.htm...
When I used this plugin in CLion to work on Rust projects it felt very sluggish to me (I had to re-execute Cargo commands to get it to pick up on new files etc., and autocomplete basically didn't work). Has this been fixed, or was it some error on my end?
There's a project setting for running linting tools on the fly rather than when invoking actions. These will do stuff like lint and refresh stuff as you type, but it adds latency and other weird jitters if the tools take longer than expected to finish execution. This is indicated next to the checkbox that enables the setting.
I usually turn the setting on, but there are a few projects that do make the UI sluggish where u have to turn them off. I'm not entirely sure what the problem is, some code with many dependencies works absolutely fine while some code with only basic crates turns into a lagfest. My suspicion is that there's a crate somewhere deep down the dependency tree that makes use of some very intensive macros that trip up the tooling.
I've also noticed that the most recent release of Rust made working with the tooling feel a lot snappier. Not sure what changed, but it's nice to see.
One laat thing I always recommend anyone running into weird IntelliJ/Clion/IDE slowdowns: check the difference between antivirus off/on to see if that influences things. Windows Defender just can't seem to deal with a program opening many small files. What this means for you depends (you probably shouldn't disable AV on a company laptop) but it may solve the mystery why your experience doesn't match other people's.
Interesting. I just updated CLion and I got a notification that "Cargo Check on the fly analysis is turned OFF". So the setting is in Languages & Frameworks > Rust > External Linters.
I have been using this for a while and don't have to do much. It automatically reloads for me. My only gripe is that it won't allow me to right-click and automatically create a use statement for Derive macros. But I may be spoiled by switching back and forth between Kotlin and Rust.
I stand corrected, looks like that has been resolved in the latest version of CLion, with the Rust plugin.
I personally haven't experienced that issue, but in my experience IntelliJ IDEs can offer a different experience per environment based on your Java and filesystem settings.
Especially if you happen to be doing anything like using WSL or a mounted network share. For example, I had to do a lot of workarounds to resolve indexing and line ending issues while working on a Windows machine and running my code on a remote container server running nix.
I've not had that experience personally, and I've used CLion with the rust plugin for quite a while.
The plug-in itself is fine now, but linting through cargo check is frustratingly sluggish especially in repos with nontrivial Diesel codegen. Like noted in a sibling comment, it’s turned off by default and you get a notification suggesting you turn it off (uess you turn off the notification).
It’s improved a lot the last year. Check it out again
> I had to re-execute Cargo commands to get it to pick up on new files etc.
This hasn't been fixed, but it's my biggest pain point.
> felt very sluggish to me
We're working in a Rust workspace monorepo with about 30 crates and it feels fast.
What kind of system? IntelliJ has always seemed to require a lot of resources.
I bought 16GB a decade ago, for example, so I wouldn’t have swapping issues with my tools. That machine is still usable today.
Every HN intellij thread:
"Its sooo slow"
I am not sure why people use these tools, I've tried and they seem at best on-par, at worse, sooo much worse. I get real Microsoft vibes, a sales team comes in, takes the purchasing team to a concert/sports and dinner to 'discuss business'. And its announced that everything needs to be done on M$ sharepoint/Intellij.
If you just "tried it", I doubt you'd seen even one percent of what they can do. I've been using IDEA for years and still learn new tricks every few days. The performance is atrocious, the well known bugs (like constantly losing caches) have been there for years, but I suffer through it because of the functionality.
I've never been wined and dined by Intellij. I just find their product very comfortable. It's always "just worked" out of the box for me. VS code I've tried a few times and it always takes a bunch of fiddling.
Less feature-ful text editors like sublime and vim just don't do it for me.
What language, and kind of project do you work on? And what other tools have you compared to IntelliJ in your workflow that are better, or so much better?
I'm very happy with the Jetbrains tools, and have been happy for years. The other tools aren't slow for me, only CLion with Rust.
Surely you mean "IntelliJ rs", right?
Kidding aside, this is nice! Always happy to see more support for Rust, and I'm usually pretty impressed by what JetBrains brings to the table in their IDEs, so this is promising! Hopefully this will be one of those cases where the less you need an IDE, the more comfortable the features are for the ones that are built.
For anyone reading the comments with the assumption the OP link is just for the longstanding rust plugin, it is. Do not take the comment above to mean a standalone rust IDE, a la Goland, was announced. Hopes lifted, hopes dashed.
They do generally try to keep IDEs focused on a topic, for example how Rider has the role of supporting both Unity (C#) as well as Unreal (C++) projects since the the folks who seem to work closely with Rider seem to be their game development SMEs.
Similarly for Rust, I figure CLion is the best bet?
You would use the LLDB debugger backend similar to your C/C++ projects you would work on with CLion.
Quite a few rust projects do touch or at least reference C projects etc...
IntelliJ ultimate is probably the one exemption, being possible to be turned into the kitchen sink IDE with the right plugins. It still maintains some of its java first nature more than the language specific quirks though, I remember IntelliJ plus the python plugin used to have the hierarchy of package and module labels inverted to what Python actually does because the labels were created with Java in mind. (It was some time ago now though, so maybe they've fixed that specific example)
> Similarly for Rust, I figure CLion is the best bet?
Yeah. IntelliJ Ultimate is also decent with Rust, but debugging & profiling support is better with CLion.
Is it notably better? I've always used IDEA ultimate since I already have it installed but that's the second comment I've seen today touting improved debugging experience. Any things you'd call out? I've never felt it's deficient in IDEA but better profiling would be a huge selling point.
I'm pretty sure they're looking into creating an official one now. I recently received an email survey asking about using Rust and which IDE I use from JetBrains. I wouldn't be surprised if an official one comes out in the next year.
Why would you like a standalone IDE instead? You'd have to pay another license instead of using an existing one.
My perspective (as a die-hard JetBrains evangelist) is that the "focused" IDEs tend to have easier mental models to map onto the underlying language, versus trying to find the 8 panel's deep dialog that configures the facets for the plugin you care about. That's not even comparing the "what is happening here?!" difference between the plugin versions and the version bundled in the standalone IDE[1]. I would suspect over sufficient spans of time they may converge, but for the most part the standalone IDE bundle is actually QA-ed and the plugins are "well, it compiled!" (or at least that's how it seems from the outside)
The advantage of using the plugins in IJ (or I guess CLion in this case) is heterogeneous development is a little easier if one already has IJ muscle memory in ways that are similarly awkward to do in in the focused distributions
1: to this very second the virtualenv management difference between PyCharm and the python plugin make me chose PyCharm 100% of the time
Largely what commenter above says. Also, the full-featured IDEs signal, and back up IME, a higher level of polish and investment.
Also, I _love_ JetBrains and have access to two different all products pack licenses (one personal, one from my employer) so there is no additional license concern.
I got excited that this is a new, official IDE for Rust from Jetbrains but it's just a repost of the usual plugin. I LOVE their IDEs for Java, Go, Python, JS, and even objective c though that one recently died. The rust plugin still for the most part does not autocomplete well and often misses compilation errors.
I've generally seen the release of a branded IDE for a language from Jetbrains to be when they have great support for it, hopefully it'll come for Rust but it's taking a long time, which unfortunately for a Jetbrains user to death at this point, means not using Rust itself.
Should Jetbrains make a specific Rust IDE? Would be cool!
I dont really get why Jetbrains even makes specific IDEs. I just use Intellij for everything and it seems to have same functionality as all their language specific IDEs?
Specific IDEs is actually the selling point for me as a polyglot developer, that often switches between projects in different languages. When I need to work on a C project, I'm in CLion; when I'm working on a Python project, I'm in PyCharm; when I'm working on Go, I'm in GoLand. I don't have a ton of plugins dragging my single IntelliJ down, I just have what I need when I need it. I could spend a bunch of time tweaking each project with project specific settings, but that eats a lot of my time I could be making features or fixing bugs with.
The other thing it does, it let's their team really focus on polishing a product. For instance with Go, they had a plugin, and it worked okay, but when they came out with GoLand, they really started filling all the gaps, and polishing the Go development experience, making sure all the default plugins for it made a great overall Go development experience by default.
These reasons are I think why you see people excited about a JetBrains Rust IDE in other comment branches of this post. The polish and ease of use. The priority on taking the point of those things that just are slightly annoying. The difference between something cobbled together or a plugin that just has to deal with existing extension points and a fully polished marketable product.
Sell more licenses maybe? Just a guess...
JetBrains RustBucket
JustRust, anyone?
I use this regularly. It's _pretty_ good. But autocomplete and Copilot tend to fight a fair bit.
I have a similar experience when using rust-analyzer and copilot in vscode.
HN markdown doesn't use _, it uses * - wrap your text in asterisks to make it italic
HN italics are too subtle for when you want to emphasise something IMO and with no bold support, _emphasis_ is what you get.
When I was a newbie for Rust, I was encouraged to use CLion with the Rust plugin. What's the difference between CLion + Rust and IDEA + Rust?
There's debugger integration included in CLion but not in idea community edition.
Serious question: why would I use this over VS Code + the Rust Analyzer extension?
Overall, I’ve found JetBrains IDEs to be “nicer” than VS Code.
There’s a level of polish and thoughtfulness in the design that I’ve not found in VS Code.
It’s hard to put into words, because it consists of lots of little things.
Definitely not perfect though. Just better IMO.
In general, I agree. VS Code has always come across as an unhappy middle ground in my personal opinion.
I usually just think: go full power user (Vim/Neovim/Emacs) or completely ready-to-go (Jetbrains). But I just have never felt like VS Code was very great, so I'm certainly biased.
Yeah agree. Jetbrains stuff just feels much more polished.
The plug-ins for JetBrains are often of a substantially better quality. Their database management extension is quite awesome. You get a lot out of the box too. Their support is usually very professional, if you ever need them. It runs on a JVM so you can tune it to your particular project requirements if you need but the defaults are fine. You shouldn’t turn on too many code inspections as they can slow down the UI responsiveness but you can tune the JVM and use a latency minimizing GC such as ZGC, though this is not something a regular user would ever need to look into I think. This will sound like an advert if I go on. And since I do a lot of other stuff in their IDEs, I have a uniform UI and UX.
+1 on the database tool. Used to hop between random tools from project to project, dbeaver, cli sql tools, oracle tool when must deal with oracle. Now everything is in one UI for me, right next to my code in one familiar interface.
Same reason you'd use any other IntelliJ IDE: Most things just work out of the box without having to install and configure dozens of plugins.
Admittedly, for Rust the gap isn't as big as with other languages, as RA is an excellent language server, but with CLion + Rust you get pretty great debugging support.
I found VSCode + analyzer + native Windows debugger to provide better feel for Rust debugging.
I've found that IntelliJ is much better at having code completion always work, even in the presence of macros. Rust Analyzer has a tendency to randomly break down when you're writing code, even with something as simple as the vec![] macro.
I reported one such case here: https://github.com/rust-lang/rust-analyzer/issues/12524, but this still happens to me pretty frequently.
I don't think you would. VSCode is free, this one is not.
Maybe fix search breaking every other month first.