3 ms·
Nice idea! I was only thinking about "how could I make Zig more efficient", I didn't even consider making Rust more similar to Zig. I added a Python script wra
by lalitmaganti 24d ago
Nice idea! I was only thinking about "how could I make Zig more efficient", I didn't even consider making Rust more similar to Zig.
I added a Python script wrapping rustc which serializes all rustc invocations for bun_* crates; you can find the recoridng at [1]. Turns out it only increased the build by 1 minute! So clearly my intuitition that it was just crate parallelism was not correct.
One more confounding factor though is that rustc is parallelised while Zig's compiler is not (yet). So it's still possible that might be the reason.
[1] https://buildprof.lalitm.com/#!/?url=https%3A%2F%2Fblogexamples.lalitm.com%2Fbuildprof-bun%2F2026-09-12%2Fbun-rust-bun-crates-serial-045592df96987576.buildprof https://buildprof.lalitm.com/#!/?url=https%3A%2F%2Fblogexamp...
- epage 23d agoWhy not just pass `-jobs 1` to cargo? Still won't be quite apples to apples because a multi-crate project will serialize more to disk.
- lalitmaganti 22d agoBecause that would also cause the dependencies to be compiled in series also! The point was only to measure "what if the Bun crate was built in one shot" not any dependencies of Bun.