I'm also curious because I've (recently) compiled more or less identical programs in Zig and Rust and they took the same amount of time to compile. I'm guessing people are just making Zig programs with less code and fewer dependencies and not really comparing apples to apples.
kristoff_it|8 months ago
All Zig code is built in a single compilation unit and everything is compiled from scratch every time you change something, including all dependencies and all the parts of the stdlib that you use in your project.
So you've been comparing Zig rebuilds that do all the work every time with Rust rebuilds that cache all dependencies.
Once incremental is fully released you will see instant rebuilds.
metaltyphoon|8 months ago
coolsunglasses|8 months ago
https://bitemyapp.com/blog/rebuilding-rust-leptos-quickly/
https://old.reddit.com/r/rust/comments/1i2pr2e/improve_rust_...
https://old.reddit.com/r/rust/comments/ua09tc/experimental_f...
https://old.reddit.com/r/rust/comments/1k9ihhn/does_breaking...
https://old.reddit.com/r/rust/comments/x9z4cm/speeding_up_in...
https://old.reddit.com/r/rust/comments/rlszeq/the_best_cpu_f...
https://old.reddit.com/r/rust/comments/1hpuy01/why_you_need_...
https://old.reddit.com/r/rust/comments/1h9bdbr/rust_llvm_by_...
https://old.reddit.com/r/rust/comments/1j1rvy1/help_me_under...
Anyhoodle, I'm looking forward to testing the compile times again when Zig says the build times are fast now.
But if we're talking about incrementality, I look forward to testing that too when it's ready. I've got a Bazel build for work that pulls together Rust along with a custom (very slow) compiler and the cached successful pipelines take 2-3 minutes (mostly the benchmark run) and the ones that churned the non-rust take 15-18 minutes, of which about 10-11 minutes is just compiling the non-rust.