A Few More Reasons Rust Compiles Slowly
As a relative neophyte in Rust (have gone through about half the chapters in the Rust Book), I recently deployed a small Rust server in DigitalOcean, and was surprised by the compilation speed.  The server's code was about 27 KB in size, producing a binary of about 160 KB in size.  But it had 92 dependencies, including transitive dependencies, and took 5 minutes and 38 seconds to build.  Which was quite impressive relative to the size of the code, even allowing for the not-super-fast CPU.<p>While I was watching its output, I realized that in Rust, all the dependencies are compiled; I'm used to Java+Maven or JavaScript+NPM where compiled dependencies are used instead, and that tends to be pretty quick (provided your network pipe is wide enough).  I'd be curious to learn why Cargo re-compiles from scratch instead of offering pre-compiled binaries as well.  I guess part of it is related to different target platforms, but it seems like if the top 5 platforms were targeted and had compiled resources available, you could reduce compile times for those platforms by a significant amount.<p>On the other hand, the error messages I ran into along the way were quite good at pointing me in the right direction about how to fix them, which saved more time than the extra compile time cost, relative to the Python-based alternative I had been trying to set up before that.