←back to thread

392 points mfiguiere | 5 comments | | HN request time: 0.856s | source
Show context
jeffbee ◴[] No.35471168[source]
Hrmm, it makes performance claims with regard to Buck1 but not to Bazel, the obvious alternative. Hardly anyone uses Buck1 so you'd think it would be relevant.
replies(4): >>35471239 #>>35471275 #>>35472290 #>>35475655 #
1. dtolnay ◴[] No.35471239[source]
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.

replies(2): >>35471321 #>>35471495 #
2. jeffbee ◴[] No.35471321[source]
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?
replies(2): >>35471351 #>>35505491 #
3. fanzeyi ◴[] No.35471351[source]
It looks like you don't have rustup.rs. You will need to install that since Buck2 is depending on nightly Rust features.
4. jeffbee ◴[] No.35471495[source]
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.
5. yencabulator ◴[] No.35505491[source]
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.)