Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The reason I was put off by Rust was compiling from source. I experimented with a ports collection package management system similar to those used in BSD a while ago, and every time a Rust program needed to be compiled, I could go to sleep; no, basically rendering the system unusable. It was like the dependency abyss of NPM combined with the worst possible compile times, even worse than C++.


Even worse than C++? That has never been my experience. I maintain C++ projects that take hours to build from scratch. Most Rust projects I install, even the very big ones, are ~3-5min max.


Are you building in release or debug? Do you have lto enabled? Rust compile time is absolutely worse than c++, and I'm not sure many in the community would disagree. You need to aggressively split large crates up to make it sane. A lot of this comes down to the fact the crate is the compilation unit rather than individual files.


It would appear that when actually measured head to head, compile times are approximately the same: https://quick-lint-js.com/blog/cpp-vs-rust-build-times/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: