Hacker News new | ask | show | jobs
by laund 1262 days ago
Rust by default only does a full build really rarely. Ive gone through days, even weeks, of working on a project without a full build.

Partial builds are of course way faster, especially if you use many dependencies (i know you don't). I mainly work with the bevy game engine in Rust, which has a lot of dependencies. Even if i don't use its dylib feature, i get 2-3s compiles. And that's on a project with multiple hundreds of thousands LoC when you include dependencies. With dylib, it goes down to 0.5-1 second builds.

If your main conclusion is based on full builds, i would urge you to re-evaluate. The normal experience is just "cargo run" which rarely does a full build.

2 comments

I've got a ~9k loc Bevy "game" I'm writing that doesn't use dylib and takes > 20 secs every update, purely because of the linking (I'm not using mold yet, but am using lld)...

i.e., I type 'cargo build', it compiles the single .rs I changed almost instantly, but then I'm staring at:

Building [=======================> ] 314/315: landscape(bin)

for the next 20 seconds.

> If your main conclusion is based on full builds, i would urge you to re-evaluate.

It's not. I show several charts comparing incremental builds too.