Hacker News new | ask | show | jobs
by twofornone 1630 days ago
Looks like a good reason to finally try out Rust. Does HN have any recommended IDEs?
9 comments

You can either use rust-analyzer[1] (for which vscode is most well supported), or IntelliJ Rust [2]. Personally, I use `rust-analyzer` with vscode as a bevy developer.

[1]: https://github.com/rust-analyzer/rust-analyzer

[2]: https://www.jetbrains.com/rust/

I use Neovim 0.6.0 with its built LSP with some plugins including simrat39/rust-tools.nvim. It uses rust-analyzer. It works extremely well but I don't use the debugger at all. I've used IntelliJ with a Rust plugin, to and it has debugger support of sorts, but the overall experience was sluggish and I never went back.
I'm just learning myself, and I found just Visual Studio Code and the Rust extension are great on Windows
Make sure to use the Rust Analyzer extension, it's is significantly better than the default Rust extension.
I tried for a minute but it just wouldn't work out of the box and I didn't have time to investigate, so I reenabled the default for now.

I thought I saw somewhere rust devs themselves recommending Rust Analyzer too

Seconded! It all works incredibly well. Rust with Visual Studio Code and the relevant suggested extensions (CodeLLDB, rust-analyzer) must be least hostile expert system I've ever used (and I've tried a few).
I _love_ the Rust plugin for Intellij. I have used VSCode a ton as well, but never for Rust. In general, I think Intellij is heads and shoulders above VSCode, but it is possible that 'rust analyzer' makes all the difference (I might check it out sometime).
It does, rust-analyser is much better than IntelliJ rust right now.
Yep, and I've used bevy. Just get VSCode and the rust-analyzer. It's remarkable how well it works together with the language. There's also a thing that prints the errors and warnings in line to make it stand out more, sometimes you'll miss a squiggle.

But also the suggestions are spot on quite often, eg finding the right import that you can just click without scrolling up to the top to insert, or adding/removing the & and * operators. You'll almost never come across a situation where you think it will compile but it doesn't.

I've tried Bevy v0.5 and it was very immature (as a matter of fact, all the Bevy "games" are single-screen). By looking at the release notes, it's not clear if it now supports OpenGL, which means that on some setups, it's not even possible to run correctly at all.

It may be fun to write a hello world, but in this case, there are much easier (and more stable) engines.

A typical setup if VSCode + Rust Analyzer. RA wasn't very stable around 6 months ago, but it was stable enough to be used regularly.

What do you mean by single screen? There's no technical reason for that to be the case and there are already games that have multiple screens, even past the basic main menu + main game loop ones. You can find multiple functioning and fun, if small, games here https://bevyengine.org/assets/#games.

> it's not clear if it now supports OpenGL

Why do you need opengl when you have support for D3D, Vulkan, Metal, OpenglES, and WebGL2? What amount of the market are you missing?

The reason you don't see many Bevy games is 1) yes, it's new and relatively immature and 2) it takes a long time to make a game. That said, I've had a lot of fun building out a tbs game with it and have been very impressed with the foundation so far. On top of that you get to write in Rust which for me is a huge productivity boost when compared to writing in say C# for Unity, but that's subjective.

> What do you mean by single screen? There's no technical reason for that to be the case

I've programmed on v0.5, and SystemSet, which is the base for state management, was very immature - it didn't even work with FixedTimeStamp (because they will compete on RunCriteria); I think it's this one: https://github.com/bevyengine/bevy/issues/2233.

I've tried implementing multiple states in a game, and it just didn't work. And I don't even know if it was a bug in my code or in Bevy, because state support is not stable, and the documentation is lacking.

Without proper state management, you'll end up running either a large amount systems, or fewer systems, with code for all the cases inside.

Due to the problematic RunCriteria design, even synchronous assets loading is problematic. There is a plugin for that, but what if another plugin causes RunCriteria conflicts? Who knows.

> Why do you need opengl when you have support for D3D, Vulkan

Because Vulkan may be broken for one reason or another, and then one ends up with a system where OpenGL is not supported, and Vulkan doesn't work. My (modern) system is such case.

> Why do you need opengl when you have support for D3D, Vulkan, Metal, OpenglES, and WebGL2? What amount of the market are you missing?

My take: Software isn't used exclusively on new computers.

I was just reading a forum thread full of complaints that a certain emulator won't work on 4th-gen i5 laptops. I want the software I write to be accessible to owners of machines at least as old as that, and I hope I can do that with Bevy.

Bevy is still in its very early days. Using their limited development time to develop for what is already today old hardware doesn't make much sense considering its peak is likely another 5+ years in the future. By the time Bevy is very mature, the hardware that is only able to run OpenGL will be even less relevant and a very small niche.

That being said, as far as I know Bevy is modular enough to write third party render backends. If it keeps growing, I'm sure someone will do that.

I’m in favor of intelliJ or CLion but I hear good stuff about rust analyzer and vacode as well.
It pains to suggest it, but VSCode is one of the best experiences.

Don't forget to also add Microsoft's C/C++ tooling for the debugging support.

Helix is nice, especially if you have rust-analyzer installed.