With Emacs, the experience was terrible

Rust is too slow to start an LSP mode. A very simple example, also wait a long time.. Cargo Metadata seems to be running. Can you help me with that



This error occurs every time you start up.
But I have no problem executing cargo Metadata manually


Does the Loading|metadata step take significant time after the first time? If you hadn't compiled the project before, Cargo will have to download dependencies at that point. The error message is not necessarily a problem.

Are you running on Windows or Linux?

I use EMAC on Linux , and I compiled it before I opened the project

I also use Emacs with rustic-mode and rust-analyzer, but unlike you, I don't see any performance problems. When I open a project for the first time, a background compilation is kicked off — it takes however long it takes to compile the project normally.

Can you please tell us how to reproduce this? What steps can we go through to test this? What version of Emacs are you using?

emacs version: 28.0.29

emacs config is :

I don't think a small sample will take long to compile. As in my screenshot, "loading" and" % "progress are shown at the beginning

Good point. This brings me to a follow-up question: how long does cargo check and cargo build take when you run them on the command line?

I believe rust-analyzer runs the equivalent of cargo check for you, so those numbers would give us a baseline to compare with.

Compiling on the command line is fast

That is strange then... I haven't seen anything like this myself.

You could perhaps look at Troubleshooting - LSP Mode - LSP support for Emacs and use the debug log to open a bug report in GitHub - brotzeit/rustic: Rust development environment for Emacs.

Where did you get your Emacs from? 28.0.29 isn't a version I recognise, so I guess you mean 28.0.92. This is a pre-test version, so it's possible that there is an issue with it, or that you have compiled it in a way that is making it slow.

Thanks for your reply

Sorry, my version is 28.0.92. I'm gonna do what you say

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.