Skip to content

Buck Overview

yashasvi edited this page May 9, 2017 · 2 revisions

Buck is a build system developed and used by Facebook. It encourages the creation of small, reusable modules consisting of code and resources, and supports a variety of languages on many platforms. Info about key concept of buck like BUCK files, build rules and targets can be found here

Build really fast

Buck builds independent artifacts in parallel to take advantage of multiple cores on your machine. Further, it reduces incremental build times by keeping track of unchanged modules so that the minimal set of modules is rebuilt. More Info

Get correct incremental builds

Buck looks at the contents of your inputs, not their timestamps to figure out what needs to be built. As a result, incremental builds should always be correct, so there's no need to perform a clean build.

Performance

  • The upfront configuration time required to load all projects in gradle is almost non-existent in buck
  • The no-op build time accurately reflects what it should be like ideally on buck
  • When making an incremental change, if you
    • Ran a build with buck before the change
    • Make the change and run buck build
    • Then proceed to undo that change and rebuild, it is built almost instantly because buck keeps a cache of the previous states of the code as well as the current one.
  • If you make a change to the private api of a class, any projects that depend on that module will not be rebuilt in buck, as the public api has not changed.