Hacker News new | ask | show | jobs
by kibwen 65 days ago
If there's a project that takes 45 minutes to produce a debug build from scratch, that's not a Rust problem, that's a them problem.

Let's compare. I just checked out ripgrep and built it and all its dependencies from scratch. Total time to produce a debug build: 6.92 seconds. This is inside a 16GB VM on a random Linux laptop (on battery); no beefy hardware here.

Let's try something beefier. I just checked out uutils (an implementation of coreutils) and built it from scratch. Total time to produce debug builds, for eighty binaries and all their dependencies: 30.26 seconds.

Let's try something beefier. I just checked out Servo, an entire browser engine, and built it and all its dependencies from scratch. Total time to build and link its one-thousand one-hundred and ten compilation units (along with its infamously huge and serial servo-script bottleneck) into a binary: 4 minutes and 38 seconds.

If Codex takes 45 minutes to build from scratch, that's an indictment of OpenAI and their development processes.

1 comments

Arguably it is a rust problem. Rust can be improved to reduce the need to do as much manual maintenance of crates dynamics to allow for faster build times. The "you're holding it wrong" answer is not a good perspective to apply and I am surprised to see a prominent member of the rust community using it.
No, one can write pathological code in any language. I welcome efforts to improve the performance of the Rust compiler, but nobody is served by optimizing for degenerate use cases to the detriment of legitimate use cases. It is, in fact, possible to hold it wrong; this isn't blithe dismissiveness, but rather an accurate statement of reality, and pretending otherwise doesn't lead to a better language.
I feel like there is an assumption here that solving the problems described will result in a worse outcome for the average rust user, but I'm not sure that's the case. Perhaps the existing way of compilation makes sense for release mode, but a different tact could be taken for compilation modes which are optimized for developer productivity.

I agree with the sentiment that you can't solve for everyone, but if a problem is prevelant in your userbase, it's worth optimizing for solving it. Not every tool will be used the way it was designed to be used.