4 ms·
You can use the Intellij plugin, which fares a little bit better in some cases, but also struggles with some scenarios. All in all IDE support is a work-in-pro
by Matthias247 8y ago
You can use the Intellij plugin, which fares a little bit better in some cases, but also struggles with some scenarios.
All in all IDE support is a work-in-progress for Rust. It's definitely a lot better than 2 years ago, but still has a long way to go.
It's currently maybe the only thing which isn't that great regarding tooling in Rust. Other features, like cargo and crates.io, feel however miles ahead of C++.
- Waterluvian 8y agoOh interesting. Am I right to read into your comment that this is more of a Rust problem rather than a Rust plugin for vscode problem?
- timClicks 8y agoNo, it's a tooling problem. Rust is a static language with a good type system.
- Matthias247 8y agoIt's more of a "not yet implemented" thing than a non-solvable problem. However a thing that needs to be considered is that building good IDE support for Rust is a very hard task, since it's a pretty complicated language (e.g. with all the type interference, traits, automatic dereferencing and conversions going on). Another fact is that the rustc compiler hasn't been built for supporting these kinds of use-cases right from the start, as e.g. the typescript and kotlin compilers have in my understanding. That means the IDE tooling can't directly query the compiler, but must duplicate some of the parsing and interference logic.
- branko_d 8y agoAnother good example of "compiler as a service" is the Roslyn compiler for C# (and also written in C#). What is interesting is that Roslyn was a complete rewrite compared to the original C# compiler (which was written in C++ and couldn't power an IDE, so the tools like Resharper had to implement their own compiler front-end, essentially). IIRC, the ability to evolve the language was also a factor. It seems that as the language matures, there comes a point where tooling (and further evolvability!) becomes important enough to justify the huge undertaking of rewriting the entire compiler. I wonder when will Rust reach that phase...
- steveklabnik 8y agoWe’ve already been in the process of it.
- geezerjay 8y ago> Other features, like cargo and crates.io, feel however miles ahead of C++. C++ with conan is pretty nice, so it really depends on how you approach a C++ project.
- pjmlp 8y agoRegarding C++, there is vcpkg for Windows only projects, and conan is winning the race for multiplatform projects.
- Matthias247 8y agoI know that there are several projects around, and I'm for example halfway comfortable with using cmake as a main build tool (bazel looks interesting too). A huge issue however is still fragmentation. Only a minimal amount of libraries are provided and can be built in this fashion, and translating and maintaining build files of others is no fun. Another annoyance can be getting into existing projects, where maintainers don't want to learn or invest in anything new, and claim that Makefiles and copying dependencies into subdirectories are just fine. There's a huge difference between a state of the art modern C++ project and the typical things one encounters.
- pjmlp 8y agoI fully agree, however I would say many existing projects are going go benefit from incrementally change into more modern C++ practices, than rebooting into Rust. It is great that the team has achieved the Rust 2018 milestone, and there are already a few key companies adopting it, but it needs to catch up with 30 years of tooling, e.g. Qt, C++ Builder, CUDA, ...
- sanxiyn 8y agoI am using vcpkg for a cross platform project, and it works great. vcpkg works surprisingly well on Linux and macOS.
- pjmlp 8y agoAh thanks, I just stated it like that due to many not wanting to deal with MS tooling outside Windows.