Meta Releases Buck2 Build System
Written by Alex Denham   
Thursday, 13 April 2023

Meta has released a new open source version of Buck, its internal build system. Buck2 is described as twice as fast as its predecessor.

Buck is a build system developed and used by Meta back when it was called Facebook. Buck was optimized for the creation of small, reusable modules consisting of code and resources, and supports a variety of languages and platforms. It was originally open sourced ten years ago, and since then has been improved by both Facebook and community developers.

buck

Buck2 is a rewrite of Buck that aims to keep the best bits of Buck1 (with a high degree of target compatibility) but also borrows ideas from academic research and build systems, including Bazel, Pants, Shake and Tup.

Meta says that among the differences of Buck2, the first is that it is fast - in Meta's internal tests, we they found it completed builds twice as fast as Buck1. It is also written to carry out remote execution first - local execution is considered a special case of remote execution, in contrast to Buck1 where it was added after. That means that things such as directory hashes can be pre-computed ready to send to remote execution, giving efficiency benefits.

Buck2 is written in Rust, as opposed to Buck1's Java. This offers the advantage of avoiding GC pauses. In addition, all Buck2 rules are written in Starlark - in Buck1, they were written in Java as part of the binary, which makes iteration on rules much faster.

Because the rules are external to the binary, the developers have been able to make the Buck2 binary entirely language agnostic. Features have been made available to all rules rather than being part of hidden internal features specific to a single language. These features include dep files,the ability to declare that a subset of the files weren't actually used, and thus not be sensitive to changes within them; and incremental actions so that unnecessary work isn't repeated if run again.

Buck2 is available now on GitHuband from the Buck2 Website.

buck

More Information

Buck On GitHub

Buck2 Website 

Related Articles

Faster Buck From Facebook

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Grafana 11 Improves Metrics
11/04/2024

Grafana Labs, creators of the Grafana open-source metrics analytics and visualization suite, has announced the preview release of Grafana 11 with improvements to make it easier to view metrics, and ch [ ... ]



Eclipse JKube 1.16 Goes GA
08/04/2024

Eclipse JKube makes deploying your Java application to a Kubernetes cluster a breeze. Let's find out what's new.


More News

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 13 April 2023 )