Compiling Rust code is so sloooow.... I don't notice it that much on my M1 Pro Max which is still a somewhat decent machine, but on a bog standard VPS it takes about 10x longer and it's hurting the morale of my one man development team.

#rust #glacial

@chakie Yes, #Rust like C++ (#Cpp) needs beefy machines to build fast. But I wonder what's biggest bottleneck on your VPS, not drives by any chance? IOPS are often trimmed down on them.
@michalfita C++ compiles faster though. Not needed to compile that much though as I use Python and Rust nowadays for the backend stuff.
@chakie @michalfita both C and C++ also distribute easily across multiple threads and other machines to compile in parallel where rust often cant :/ (the c++20 modules feature also causes this problem with c++ as well though, though pretty much nobody uses that)
@raptor85 @chakie In the end most of the time is linking. As far as I'm aware Rust compiler is capable of multithreading for certain stuff, it's not single core pipeline, especially with multiple crates to compile first.
@michalfita @raptor85 In my simple case 97% of compilations have no new crates and no changed dependencies. A clean compilation takes 10-15 minutes for my 3600 line codebase with a bunch of dependencies.
@chakie @raptor85 15 minutes 😱 that VPS is *DAMN* slow.
@michalfita @raptor85 It’s what 10€ gets me at Digital Ocean. I should really move my stuff elsewhere to some European service.