Hacker News new | ask | show | jobs
by dtolnay 1170 days ago
I have a non-toy multi-language project in https://github.com/dtolnay/cxx for which I have both Buck2 and Bazel build rules.

On my machine `buck2 clean && time buck2 build :cxx` takes 6.2 seconds.

`bazel clean && time bazel build :cxx` takes 19.9 seconds.

2 comments

That's cool. I was not able to repro due to the buck2 instructions not working for me, two different ways

   Compiling gazebo v0.8.1 (/home/jwb/buck2/gazebo/gazebo)
  error[E0554]: `#![feature]` may not be used on the stable release channel
  --> gazebo/gazebo/src/lib.rs:10:49
Then with the alternate instructions:

  error: no such command: `+nightly-2023-01-24`
 Cargo does not handle `+toolchain` directives.
 Did you mean to invoke `cargo` through `rustup` instead?
It looks like you don't have rustup.rs. You will need to install that since Buck2 is depending on nightly Rust features.
FWIW buck2 doesn't seem to build with nightly-2023-01-24 at this time, nightly-2023-03-15 worked for me. (Nightlies from April cause an internal compiler error.)
Anyway regardless of the fact that my local Rust environment isn't cut out to repro your result, how much of that speedup is due to parallelism that Buck2 offers and Bazel does not? When I build your cxx repo with bazel and load the invocation trace, the build was fully serialized.