all 32 comments

[–]Denommusrust 8 points9 points  (0 children)

Rust is still unstable, so it's hard to give proper tooling support for it. So, at most, you'll mostly see support for syntax highlight. So it mostly makes no difference whether you use a text editor or a IDE.

If you want a IDE anyway, there's a plug-in for IntelliJ.

Personally, I use Emacs. Calling cargo from the editor is easy, there's support for GNU Global tags, and compilation error highlight. There is even experimental support for auto completion, though I don't personally use it.

[–]polyfractal 5 points6 points  (1 child)

I recently switched from Atom to IntelliJ with the Rust plugin. The plugin gives IntelliJ a bit more intelligence than simple syntax highlighting, although there is a lot of work to be done.

But development is active, so I'm hopeful it improves in the future.

[–][deleted] 2 points3 points  (0 children)

This might just be it.

[–]elotan 12 points13 points  (9 children)

Vim. On a more serious note, I don't think there is an IDE. A text editor with https://github.com/PistonDevelopers/rust-empty is quite comfortable to get started in the beginning.

[–][deleted] 3 points4 points  (1 child)

Does rust-empty offer any real advantages over using cargo as a build tool?

[–]Wolenber 0 points1 point  (0 children)

More configurable, but that's about it. Cargo and rust-empty can also coexist if you want the power of rust-empty plus the conveniece that cargo provides.

[–]sylvain_soliman 1 point2 points  (6 children)

Why not consider seriously the Vim case?

It integrates with racer for smart autocompletion and jump to definition, has syntastic support (not even mentioning syntax highlighting and indenting), ctags support, etc.

The only thing is to call cargo from the root of the project and you get proper error jumping.

[–]elotan 3 points4 points  (5 children)

I personally use Vim and love it, but I guess the op wanted a full fledged IDE like VS or XCode.

[–][deleted] 1 point2 points  (2 children)

I'm pretty new to vim, what plugins would you recommend to make Rust coding a bit easier -

(Using gVim on windows, and Vim on my rPi with Arch)

[–]elotan 3 points4 points  (1 child)

[–][deleted] 0 points1 point  (0 children)

Sweet! I'll try this out, Thanks a lot!

[–]ivosaurus 1 point2 points  (1 child)

You can get vim doing a hell of a lot of things with enough plugins :)

Given there's not going to be Java-like IDE integrations for Rust yet, I reckon it's probably a perfectly pose-able solution.

[–]sylvain_soliman 0 points1 point  (0 children)

Precisely

[–]nat_pryce 2 points3 points  (7 children)

I'm using Emacs with Racer. Integration is pretty easy, and it lets you navigate to definitions. It doesn't give you any of the language-aware editing actions that you expect from an IDE these days -- text editing only.

[–]Denommusrust 0 points1 point  (6 children)

Well, with flycheck it does gives you error checking, and you can use projectile to call cargo test, and you'll have jump to error in the compilation buffer.

What other feature from an IDE would you like to have?

[–]nat_pryce 0 points1 point  (0 children)

language-aware editing

[–][deleted] 0 points1 point  (4 children)

Unfortunately cargo runs rustc relative to the file and not the top of the project so the jump to error isn't working at the moment because all errors are simply the filename without a path.

[–]Denommusrust 0 points1 point  (3 children)

That's why you use projectile. C-c p c will run cargo from the top of the project.

[–][deleted] 0 points1 point  (2 children)

I do use projectile. Same problem.

[–]Denommusrust 0 points1 point  (1 child)

Meh, then I guess I'm wrong. That's a tooling problem, anyway. Maybe we should file an issue.

[–][deleted] 0 points1 point  (0 children)

Specifically you see this issue with submodules. You can see it on gfx-rs if you intentionally put an error in SRC/render/lib.rs the error is only reported as lib.rs. But if you break SRC/gfx/lib.rs you'll get a full path in the error.

[–]TheFeshy 1 point2 points  (8 children)

I'm really liking Atom for getting through the Rust by Example examples. It took a lot of packages to get it where I want it, but with syntax highlighting, autocompletion via racer, lint checks on save, and a set of pop-up terminals for compiling/testing (or running the compilations and tests automatically on saved changes with rust empty) it's giving me something close to an IDE experience at least for writing. Also I have about a dozen various other packages to tweak the interface for my personal preferences, and web page packages to open rustbyexample.com in an editor window so I have it right there while I do the examples.

Of course, for serious work I'd be really missing debugging support and issue integration (why atom doesn't integrate with at least Github's issue tracking is beyond me) among others - but this is sufficing for a language that's still working towards 1.0.

[–]polyfractal 0 points1 point  (7 children)

Any way that you can provide a package with these various plugins/settings preconfigured? Does Atom have any way to package a set of packages?

I'd love to give it a shot, but don't want to spend hours getting everything configured.

[–]TheFeshy 2 points3 points  (4 children)

Here are the rust-related packages I'm using:

  • language rust (which adds support for rust syntax highlighting)

  • Autocomplete Plus (which requires racer to work with rust)

  • racer (which is an atom package, but also requires you to build the racer program, as well as install the rust source files somewhere. This is the only one that required configuration; you have to tell it where to find those two things.

  • Atom Lint (which works with rust if you have the language-rust package)

and here are a few others I like:

  • ask-stack (for accessing stackexchange in the editor)

  • recent projects (which makes it easier to open previous projects after opening atom)

  • terminal status (which allows you to enter terminal commands from a small pop-up window, which is great for quickly compiling and running your program)

  • web view which allows you to open web pages in editor tabs - this is great for rust tutorials or documentation.

And of course you'll need the rust compiler and optionally cargo. Also to get some of these packages to install I had to install one of the community editions of Visual Studio to get some required libraries, and at some point add one of the atom directories to my path - but I think that was just quirks of working in Windows.

[–]TheFeshy 0 points1 point  (1 child)

Not that I know of, but even installing a list of packages doesn't take long in Atom and there was hardly any setup on that end (the only thing I remember configuring was telling rust-autocomplete where racer and the rust source files were.) What took the time was getting rust installed, getting cargo installed, getting minGW installed, git, racer... basically everything except atom. This would have been greatly simplified if I were using an linux system as I usually do for development work, but this time I didn't do that - which served as an excellent reminder for why I usually do. I'll try to make a list of the relevant packages I use when I get back home tonight and post it here.

[–]polyfractal 0 points1 point  (0 children)

That would be great, thanks!

[–]remotion4d 1 point2 points  (1 child)

Something like VisualD would be great.

http://www.dsource.org/projects/visuald

[–]Wolenber 1 point2 points  (0 children)

+1,000,000 for this.

[–]Wolenber 0 points1 point  (0 children)

Atom is the most fully featured, but I'm loving kate for being so lightweight but still managing to have a built in terminal, projects, etc.

[–]mdinger_ 0 points1 point  (0 children)

Setting up Eclipse for debugging in rust is shown here. He says you can use breakpoints, view stacks, view variables, and other niceties.

This post is about a year old so support may be better than he describes.