4 ms·
nice! can you talk more about Rust's tooling? How do you debug? What IDE or text editor do you feel comfy with? Do you have/use/need autocomplete? I'm coming f
by fb03 9y ago
nice! can you talk more about Rust's tooling? How do you debug? What IDE or text editor do you feel comfy with? Do you have/use/need autocomplete?
I'm coming from a a Python background and I'm too spoiled by Pycharm's insane tooling and autocomplete and stuff.. I wanna trail de Rust path too!
thanks in advance.
- richardwhiuk 9y agoRust with VSCode and RLS gives pretty good code auto-complete.
- Rusky 9y agoNot pimeys, but VSCode with the RLS plugin has pretty good IDE functionality. Personally I tend to use Vim out of habit, and debug in Visual Studio. I might switch at some point for RLS (or try to hook it up to Vim).
- lambda 9y agoWhile I mostly use Emacs and have only actually written a little bit of Rust, from what I've gathered the two best IDE experiences are either VSCode with RLS (Rust language server, which uses an adaptation of the compiler for reporting syntax errors and various other information like jump to definition, coupled with a simpler but faster engine for things like autocompletion so that you can start doing that before the server finishes a full compile) and the Rust IntelliJ Plugin which uses IntelliJ's native tooling and adapts it to understand Rust, which has the advantage of all being originally written for fast and robust autocompletion, highlighting, and the like, rather than adapting something written as a compiler to provide that information, but the disadvantage that you need to implement a lot of Rust's syntax and type inference so there are some more complicated cases that it can't necessarily handle yet. If you're interested in trying out a Rust IDE, those are the two I'd try and see how you find them.
- mrsteveman1 9y ago> nice! can you talk more about Rust's tooling? How do you debug? What IDE or text editor do you feel comfy with? Do you have/use/need autocomplete? For writing code, I've been using IntelliJ with the Rust plugin for the past year. Autocomplete works pretty well, there is Cargo integration so you can edit your dependency file in IntelliJ and things will automatically update so that autocomplete and documentation (go to definition) for the newly added dependencies start working immediately. There is also simple build/check/run support, with build and test output appearing in the lower panel inside the IDE. There are some quirks, but they have been very minimal. I've never used IntelliJ to debug Rust itself, because in most of the projects I've worked on, the Rust code has been designed as a completely separate library with a semi-public API, intended for embedding in another language like Swift or C#. So the debugger has almost always been Visual Studio or Xcode, but it works exactly as I would expect even without using any sort of Rust plugin for either one. The other day I was stepping through the call stack to find the source of a crash (one that I caused by failing to keep the P/Invoke signatures up to date with our Rust functions), and Visual Studio switched right from C# to Rust from one frame to the next, showing the source code and the line where the crash occurred in Rust. Really I can't think of anything that has been even a moderately significant problem, it's been great all around.
- pimeys 9y agoMaybe one day I'm jumping the IDE train, but now it's Emacs with racer.
- hsivonen 9y agoI'm not pimeys, but on the debugging question: I use rr for debugging (with gdb's command-line UI; I wish a GUI like Eclipse supported rr). I can't emphasize enough that trying rr is worthwhile if you are developing in a language that gdb supports (not just Rust but C and C++, too).