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


JetBrains Updates IDEs With AI Code Completion
04/04/2024

JetBrains has launched the first set of updates for 2024 of its JetBrains IDEs. The new versions include full-line code autocompletion powered by locally run AI models.



Women Who Code Closing For Lack of Funding
24/04/2024

Women Who Code the US-based non-profit organization that since its foundation in 2011 has advocated for women and diversity in technology, has announced its imminent closure due to critical funding cu [ ... ]


More News

raspberry pi books

 

Comments




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

Last Updated ( Thursday, 13 April 2023 )