r/rust • u/Gloomy-Lab4934 • 2d ago
Laptop recommendations for rust programming
Folks, I’m wonder if a MacBook Air M5 with 16 GB RAM is enough for the workload. Do I need more RAM? What is the minimum SSD size?
Thanks
0
Upvotes
14
u/KellysTribe 2d ago
probably enough ram (but more is always better). you will need a lot of drive space if you're working on many projects/worktrees
4
u/Healthy-Zebra-9856 2d ago
If you work on many projects, your target folder tends to get huge. So whatever highest on RAM & SSD you can get, the better it is.
5
u/monty-mar 2d ago
"enough for rust programming" is really very relative. I do a lot of my Rust dev in a pretty old thinkpad. It's more than enough for my smaller projects.
For my larger projects, like Bevy games and such, it's very slow to compile. Way too slow if you want to get stuff done in a reasonable amount of time.
7
u/git_oiwn 2d ago edited 2d ago
16Gb RAM is more or less enough. But Rust is very storage hungry, expect 70+Gb "target" size per non-toy project. I suggest to get 1Tb. Personally i have m4pro 24Gb/512Gb (only for work) and i'm already tight in space, need to be careful and "cargo clean" projects i'm not working on.
3
u/velocityvector2 2d ago
I’m writing a game using macroquad crate on a MacBook Pro 2016 with 16GB of RAM (running Fedora 45).
2
u/Amadex 2d ago
I work on backend and our infrastructure uses several linux-only features like io-uring so I prefer a linux
but if you really want a mac and doing more higher level things (like webdev), or you don't care about the kernel level stuff, you're fine (and there are ways around it (cloud dev, vms,...)).
as others have said, compilation artifacts can take a lot of space so you should take enough disk space to feel comfortable and not feel the need to spam cargo clean everyday.
2
u/llogiq clippy · twir · rust · mutagen · flamer · overflower · bytecount 2d ago
Between 2017 and 2019, I contributed to clippy and the rust compiler (besides other projects) on a HP ChromeBook 13 G1. That thing had a dual core 1.1GHz mobile skylake, 4GB of RAM and 32GB of disk. Also fanless.
I had to enable filesystem compression to make sure the disk space doesn't run out, and compile times were somewhat brutal, but it worked. That said, my wife has a M2 macbook and I've done some stuff on it and it's fast enough for light to medium use without getting hot. If you have larger projects, it will throttle.
1
u/diagraphic 2d ago edited 2d ago
I have a Macbook Pro M5 (Pro). 24GB memory, 1TB NVMe bought it couple months ago, mind you this is not my main computer, its a side piece for basic work. I'd say very, very powerful laptop for most programming tasks. 16GB and an air, honestly I don't think would be enough. I had an air before and it wasn't enough for the type of programming and research I do (heavy on the processes). I'd be weary on getting it unless you are just browsing and writing simple systems, nothing large. This is non agentic, if you going agentic, way more as you want parallelism, getting agents on tasks require resources!
1
u/wyvernbw 2d ago
i get by on a macbook air m2 with 8gb ram and 256gb ssd, cold builds can be annoying but other than that no complaints
1
u/nicoburns 2d ago
16GB of RAM will be fine today. But I'd buy 32gb, because you'll probably save money overall on the increased longevity of the machine (if you continue the have enough RAM, you could probably keep one of these machines for 10 years).
I'd say 1TB minimum for Rust dev. More would certainly be useful, but I wouldn't personally be willing to pay for it.
1
u/tanmaynargas2901 2d ago
16GB is fine for most Rust work. Disk is the thing that actually runs out, like people said.
Some stuff that helps if you end up on 512GB:
cargo install cargo-sweep, thencargo sweep --time 30inside a project drops build artifacts older than 30 days instead of wiping everything like cargo clean does.Turn down debug info for dev builds. In Cargo.toml:
You still get backtraces with line numbers and target/ gets noticeably smaller.
A shared CARGO_TARGET_DIR saves space across projects with overlapping deps. The catch is two projects can't build at the same time since they wait on the same lock, and one cargo clean wipes all of them.
1
u/bombay-boyz 2d ago
RAM is enough. Clean storage regularly