Best Rust-dev computer option

I'm at a point where the computer I currently use for Rust dev just is so old and slow to be virtually unusable. I'm shopping for a new computer. I'm thinking about a laptop, because it'll replace a laptop. However, I'm willing to build my own desktop PC if it is clearly better. I don't have a huge budget, so it'd probably need to be a mid-range option at best. However, I do have a few requirements:

  1. It'd need to have an SSD. After using a computer with an SSD at work, I just can't go back to waiting 2 minutes each time I open a new code file for the first time.
  2. It needs to be fast at compiling not just Rust, but among others also Rust. Other things it'd need to do is compile a 1Mloc+ C++/Qt project in less than 30 minutes, which is what a clean build takes currently. I will also probably program in C, C#, Python and node.js (and maybe Haskell, if I get round to it).
  3. I'd definitely want a large enough disk to be able to dual boot Windows and Linux, or run a Linux VM. (or install Linux and run a Windows VM...)
  4. I really don't care about how the thing looks. If it looks pretty, it's a bonus, but I won't spend extra money on looks. It needs to be functional.

Are there any people who upgraded recently who can give me some suggestions. E.g. is Intel 11th gen or Zen2 better for code compilation? How much RAM do you need to have a decent experience? What do you think is a minimum for disk space?

Thanks!

I typically use around 100 GB per laptop, so I would not want a 128 GB disk, but 256 would be ok. My current laptop has 512 GB of SSD space. That said, if you dualboot, you should probably assume that you need double what you would otherwise need.

I find that 8 GB is ok for what I use my laptop for — I don't play any games or stuff like that. I ran my current laptop with 8 GB for a few months without issues, but I now have 24 GB in it because I had a 16 gig stick lying around. It probably depends on the number of electron apps you need :sweat_smile:

I don't know which CPUs are better for compiling code, besides faster is better. I use a Thinkpad T480s, which has an Intel cpu, and it's plenty fast.

On RAM I'd strongly consider going for 16GB or more (if you can afford it). 8GB can be a bit restrictive when compiling big projects (like rustc itself), especially if you have other things running at the same time (like a code editor). Virtual memory can help but if the OS starts swapping it's going to hurt performance.

I think Zen2 will give you the best overall performance for the price. And I believe the Rust compiler can make good use of many threads so it might be the best option.

In desktops, Ryzen definitely is the best option for Rust. If you're on a tight budget, Ryzen 3300X should be enough to use Rust comfortably.

I've used Rust on a 16GB machine without problems (including building rust and LLVM). It should be reasonable to aim for 1GB of RAM per CPU core.

Cargo caches are huge. IMHO every SSD these days is fast enough, so I suggest picking larger over faster.

Well, yes, and any SSD will be faster than the mechanical HDD from 2009? I'm used to...

Thanks for all the replies! They have been noted. I'll check out a few options when I can with these suggestions in mind.

1 Like

Hello, I run on a Surface Laptop and have no issues doing anything I need. I can do everything withing Windows. I do have WSL installed and play with that also. But don't usually need it really other than to just play around with.

You'll definitely get more bang for your buck with a desktop, if you don't need portability. Even when I do use a laptop, I prefer to shell into a better machine for development.

There was a reddit thread like this recently where people shared rustc build times with various systems. That might help you decide where to best apply your money.

1 Like

One member of our team recently bought 16GB of RAM to add to his existing 16GB, because Rust Analyzer bogged down his computer (used up 4GB just by itself).

I personally would recommend going Zen2. I recently built this PC for development. Note that if you want to go for an APU (integrated graphics) build as well, I recommend waiting for the new 4700G that's rumored to be released Really Soon Now™.

Otherwise, if you want a dedicated GPU, wait for the new XT lineup of AMD CPUs that's rumored to be announced on June 16. Zen3 is still at least half a year away, so there's no point in waiting for those.

I got a good used HP ZBook 15 with 32GB of RAM, 1TB disk, 512 SSD, a dedicated GPU and a quad core CPU for 700€ two years ago.

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.