8GB is not a lot to work with. It mostly depends on what crates you work with (unfortunately by default rust statically links all code in a single final step and that can be consuming a lot of RAM) Modern editors consume a lot of RAM, and if you have rust-analyzer running it's going to use a lot more in addition to the editor.
Tips:
- trim down yout dependencies (check out
cargo tree,cargo depgraphand thecargo build --timings). Instead of enabling all features on crates, enable only what you need. - to free up disk space run cargo clean on the projects you are not currently working on, and regularly on your current project. If you change dependencies often it's going to use up a lot of GBs of disk space. You'll need to recompile all the dependencies every time you run it though, so don't do it too often.
- fully close other programs if possible (browsers, chat apps, etc). Look at your task manager to see what's using up memory and kill as much as possible. Consider browsing from your phone instead, and using the PC browser just as needed.
- emacs and vim have a very steep learning curve. I would suggest against that. If it's still too frustrating to code like this, you can disable the language server (rust-analyzer), but it's going to make coding harder. You'll loose edit suggestions and error highlighting. It's still possible to code without rust-analyzer but you'll need to run
cargo checkvery often and read up method names on docs.rs a lot more.