Buck (software)

Last updated
Buck
Original author(s) Michael Bolin
Developer(s) Meta Platforms, Inc.
Initial releaseApril 17, 2013;11 years ago (2013-04-17) [1]
Stable release
2021.01.12.01 / January 12, 2021;3 years ago (2021-01-12) [2]
Repository
Written inBuck1 – Java
Buck2 – Rust
Operating system Cross-platform
License MIT [3] or
Apache License 2.0 [4]
Website buck2.build   OOjs UI icon edit-ltr-progressive.svg

Buck is a multi-language build system developed and used by Meta Platforms, Inc. It was designed for building small, reusable modules consisting of code and resources within a monorepo. [5] It supports many programming languages, including C++, Swift, Unix Shell, Java, Kotlin, Python, Lua, OCaml, Rust and Go. It can produce binary outputs for a variety of target platforms including iOS, Android, .NET, and Java virtual machine (VM) runtime systems. Licensing for Buck1 is under Apache License 2.0, while Buck2 is under either MIT or Apache 2.0. [3] [4]

Contents

Buck requires the explicit declaration of dependencies. Because all dependencies are explicit and Buck has a directed acyclic graph of all source files and build targets, Buck can perform incremental recompilation, only rebuilding targets downstream of files that have changed. Buck computes a key for each target that is a hash of the contents of the files it depends on. It stores a mapping from that key to the build target in a build cache.

History

In 2013, Buck1 was released. One of the key features was the ability to share build results between multiple developers and continuous integration (CI), as Buck1 supports a HTTP Cache API. [6]

In 2023, Buck2 was released, claiming that builds are 2x as fast as compared to Buck1. One of the largest changes from Buck1 is that the core is written in Rust instead of Java, and rules are written outside the core in Starlark (the language created for the Bazel build system). [7]

See also

Related Research Articles

Maven is a build automation tool used primarily for Java projects. Maven can also be used to build and manage projects written in C#, Ruby, Scala, and other languages. The Maven project is hosted by The Apache Software Foundation, where it was formerly part of the Jakarta Project.

<span class="mw-page-title-main">Git</span> Distributed version control software system

Git is a distributed version control system that tracks versions of files. It is often used to control source code by programmers who are developing software collaboratively.

<span class="mw-page-title-main">Mercurial</span> Distributed revision-control tool for software developers

Mercurial is a distributed revision control tool for software developers. It is supported on Microsoft Windows, Linux, and other Unix-like systems, such as FreeBSD and macOS.


This is a comparison of notable free and open-source configuration management software, suitable for tasks like server configuration, orchestration and infrastructure as code typically performed by a system administrator.

Qbs is a cross-platform free and open-source software for managing the build process of software. It was designed to support large, complex projects, written in any number of programming languages, primarily C/C++.

Nix is a cross-platform package manager for Unix-like systems, and a tool to instantiate and manage those systems, invented in 2003 by Eelco Dolstra.

Gradle is a build automation tool for multi-language software development. It controls the development process in the tasks of compilation and packaging to testing, deployment, and publishing. Supported languages include Java, C/C++, and JavaScript. Gradle builds on the concepts of Apache Ant and Apache Maven, and introduces a Groovy- and Kotlin-based domain-specific language contrasted with the XML-based project configuration used by Maven. Gradle uses a directed acyclic graph to determine the order in which tasks can be run, through providing dependency management. It runs on the Java Virtual Machine.

Dart is a programming language designed by Lars Bak and Kasper Lund and developed by Google. It can be used to develop web and mobile apps as well as server and desktop applications.

<span class="mw-page-title-main">GraalVM</span> Virtual machine software

GraalVM is a Java Development Kit (JDK) written in Java. The open-source distribution of GraalVM is based on OpenJDK, and the enterprise distribution is based on Oracle JDK. As well as just-in-time (JIT) compilation, GraalVM can compile a Java application ahead of time. This allows for faster initialization, greater runtime performance, and decreased resource consumption, but the resulting executable can only run on the platform it was compiled for.

React is a free and open-source front-end JavaScript library that aims to make building user interfaces based on components more "seamless". It is maintained by Meta and a community of individual developers and companies.

Lightning Memory-Mapped Database (LMDB) is an embedded transactional database in the form of a key-value store. LMDB is written in C with API bindings for several programming languages. LMDB stores arbitrary key/data pairs as byte arrays, has a range-based search capability, supports multiple data items for a single key and has a special mode for appending records (MDB_APPEND) without checking for consistency. LMDB is not a relational database, it is strictly a key-value store like Berkeley DB and DBM.

<span class="mw-page-title-main">RocksDB</span> Embedded key-value database

RocksDB is a high performance embedded database for key-value data. It is a fork of Google's LevelDB optimized to exploit multi-core processors (CPUs), and make efficient use of fast storage, such as solid-state drives (SSD), for input/output (I/O) bound workloads. It is based on a log-structured merge-tree data structure. It is written in C++ and provides official language bindings for C++, C, and Java. Many third-party language bindings exist. RocksDB is free and open-source software, released originally under a BSD 3-clause license. However, in July 2017 the project was migrated to a dual license of both Apache 2.0 and GPLv2 license. This change helped its adoption in Apache Software Foundation's projects after blacklist of the previous BSD+Patents license clause.

<span class="mw-page-title-main">Bazel (software)</span> Software tool that automates software builds and tests

Bazel is a free and open-source software tool used for the automation of building and testing software.

FlatBuffers is a free software library implementing a serialization format similar to Protocol Buffers, Thrift, Apache Avro, SBE, and Cap'n Proto, primarily written by Wouter van Oortmerssen and open-sourced by Google. It supports “zero-copy” deserialization, so that accessing the serialized data does not require first copying it into a separate part of memory. This makes accessing data in these formats much faster than data in formats requiring more extensive processing, such as JSON, CSV, and in many cases Protocol Buffers. Compared to other serialization formats however, the handling of FlatBuffers requires usually more code, and some operations are not possible.

In version-control systems, a monorepo is a software-development strategy in which the code for a number of projects is stored in the same repository. This practice dates back to at least the early 2000s, when it was commonly called a shared codebase. Google, Meta, Microsoft, Uber, Airbnb, and Twitter all employ very large monorepos with varying strategies to scale build systems and version control software with a large volume of code and daily changes.

yarn (package manager) JavaScript package manager

Yarn is one of the main JavaScript package managers, developed in 2016 by Sebastian McKenzie of Meta for the Node.js JavaScript runtime environment. An alternative to the npm package manager, Yarn was created as a collaboration of Facebook, Exponent, Google, and Tilde to solve consistency, security, and performance problems with large codebases.

<span class="mw-page-title-main">Deno (software)</span> Secure JavaScript and TypeScript runtime

Deno is a runtime for JavaScript, TypeScript, and WebAssembly that is based on the V8 JavaScript engine and the Rust programming language. Deno was co-created by Ryan Dahl, who also created Node.js.

raylib Game programming library

Raylib is a cross-platform open-source software development library. The library was made to create graphical applications and games.

References

  1. Bolin, Michael (May 14, 2013). "Buck: How we build Android apps at Facebook". Notes. Facebook . Facebook Engineering. Retrieved 2019-07-16.
  2. "Releases: facebook/buck". GitHub.
  3. 1 2 "buck/license-mit". GitHub . December 1, 2022. Retrieved 2023-04-19.
  4. 1 2 "buck/license-apache". GitHub . December 1, 2022. Retrieved 2023-04-19.
  5. "Overview". Buck: a build tool. Retrieved 2018-07-16. Buck is designed to build multiple deliverables from a single repository—that is, a monorepo—rather than from multiple repositories
  6. Bluestein, Nofar. "Introducing Cache Intelligence for Faster, More Efficient Continuous Integration Builds | Harness". Harness.io. Retrieved 2023-06-06.
  7. Krill, Paul (2023-04-06). "Meta open-sources 'significantly faster' build system". InfoWorld. Retrieved 2023-06-06.