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:
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.
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).
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...)
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?
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
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.
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.
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.