Autumn is here (wait, this is GSoC, not GoT)


I just watched the season 7 finale of Game of Thrones earlier today, I couldn't help it, sorry.

So, as summer is coming to an end, Google Summer of Code is also wrapping up, and the KDevelop Rust plugin is looking good at this point. It now supports semantic highlighting, go-to-definition, renaming declarations, some code completion, debugging, highlighting code errors, and code formatting. I'll go into a bit more detail for the last three since they were the most recent additions. 

I also focused on a lot of minor improvements this past month to make the plugin easier to build and use, to make it more reliable, etc., so at this point kdev-rust is a solid basis for anyone looking for a Rust IDE.

Debugging

As I've mentioned before, KDevelop supports both the GDB and LLDB backends, so debugging was a matter of hooking up the backend for Rust executables. Here it is in action:


Video should appear here; if it doesn't click here

Code formatting

Don't you just hate it when your code is just all over the place like in this totally not contrived example below? Well, worry no more, you can now reformat it straight from the editor!

Video should appear here; if it doesn't click here

Diagnostic messages

I mentioned in my last post that I'm looking at exposing error messages from libsyntax to KDevelop. This now works for parsing errors, but now that the underlying infrastructure is there, type errors and lints are soon to follow:

Video should appear here; if it doesn't click here

If the videos above aren't loading, they are available here, here and here.

What now?

If you've been following my blog you should know by now I'm a huge fan of Rust. The KDevelop Rust plugin is usable at this point, but as with any project, there is a lot that can be added. I very much intend to continue working on the Rust plugin in my free time even after GSoC has finished, so please feel free to try it out and send me feedback.

The kdev-rust repository is available here (mirror). A nightly Rust compiler is required to build the supporting library.

Comments

  1. Thanks a bunch ! I'll be more motivated to learn Rust now with the help of an awesome IDE like KDevelop

    ReplyDelete
  2. Hello,
    Can you expand on which kinds of completion are currently supported? It seems having better ones than the rls currently has was a big argument in choosing the libsyntax approach...
    Also, what are the plans for packaging this for Ubuntu /fedora/...?
    Thanks for the great work!

    ReplyDelete
  3. This looks great! Unfortunately when I try to build kdev-rust I get a bunch of "no matching function" errors(https://pastebin.com/vZdEfYy9). Am I missing a dependency or something? Thanks.

    ReplyDelete
    Replies
    1. Hey, that's probably because you're building based on the currently released KDevelop version. It should work if you build against master. You can use kdesrc-build for that which handles dependencies. Feel free to drop by on IRC at #kdevelop on freenode if you have questions.

      Delete
  4. Wow! Between this and the Go work, I might have to start using KDevelop again!

    ReplyDelete

Post a Comment

Popular Posts