by cesarb · 6y ago · 0 comments
A trick available on newer releases of rustc is "cargo check", that stops the compilation before the code generation (which is the slow part). If all you need at the moment is to see whether it would compile (no syntax errors, no wrong types, no borrow check errors), it can help a lot.
I'll probably find a way to cgroup rustc just to deal with this issue.
That and the guidance kouteiheika gave above puts you far already.
Of course nowadays the combination of Emacs and rust-analyzer gives you a very fast and nice workflow. That and one terminal running
cargo watch -s 'clear; cargo check --tests --color=always 2>&1 | head -40'
works miracles.I think my plan is to just move builds to some kinda EC2 instance that I can bulk up.