Rust and Emacs?

Does anyone have a pointer to a guide for using Rust in emacs? I have rust mode working for syntax highlighting, and gdb works, but I would like all of (or at least some of) those nifty language server features.

So far in my web searching the newest guide I can find is over 3-years old. A lot has happened in the last three years.

Thanks,

-kb

1 Like

Are you aware of the rust-analyzer docs for using emacs?

1 Like

That might be the tib-bit I was looking for, let me try it.

(I think I saw that in my searching, had NOT tried it.)

Thanks,

-kb

1 Like

Have a look at rustic-mode.
Personally I use it as part of Prelude.el, so I can't tell you how to manually set it up. But the docs should help a bit.

1 Like

That was a good starting point, thanks.

I have long said that I hate emacs, but it is what my fingers know. I am not an emacs jock who tweaks together a customized version. No, I like sane defaults.

I do have a bunch of Rust-specific emacs features working. It was a little involved to get things working, because this is emacs, but I managed. If anyone is interested I can share the gory details.

Thanks,

-kb

P.S. I even managed to duplicate my setup on the Raspberry Pi Zero I have been programming. And though Rust is fast and frugal, those words only apply to the runtime world. Getting IDE features working requires power exceeding a supercomputer: A Raspberry Pi Zero is significantly more powerful than the original Cray 1 supercomputer, and it is unusable mostly over there.

2 Likes

Bit late to the party here, but here is an additional excellent resource that I'd just been reading today. I came on to see if I could find any more resources for exactly this issue, so perhaps posting will help others on a similar quest in the future. It's very nicely detailed.

2 Likes

That does look like a good page, though I think I have most of that working. Particularly the code navigation stuff that was probably most important to me.

It might be useful to others…

Thanks,

-kb

1 Like